@plone/volto 16.31.5 → 16.31.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changelog.draft +2 -7
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/src/components/theme/View/View.jsx +0 -5
- package/src/helpers/Api/Api.js +1 -1
- package/src/helpers/Api/Api.plone.rest.test.js +6 -8
- package/src/helpers/Api/Api.test.js +6 -8
package/.changelog.draft
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
## 16.31.
|
|
1
|
+
## 16.31.6 (2024-05-09)
|
|
2
2
|
|
|
3
3
|
### Bugfix
|
|
4
4
|
|
|
5
|
-
- Fix
|
|
6
|
-
- Fix 301 and 302 redirects. @robgietema [#6001](https://github.com/plone/volto/issues/6001)
|
|
7
|
-
|
|
8
|
-
### Documentation
|
|
9
|
-
|
|
10
|
-
- Block search engines from indexing content on Netlify preview builds. @stevepiercy [#5916](https://github.com/plone/volto/issues/5916)
|
|
5
|
+
- Revert "Fix 301 and 302 redirects" which was not working correctly. @davisagli [#6009](https://github.com/plone/volto/issues/6009)
|
|
11
6
|
|
|
12
7
|
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.31.6 (2024-05-09)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Revert "Fix 301 and 302 redirects" which was not working correctly. @davisagli [#6009](https://github.com/plone/volto/issues/6009)
|
|
16
|
+
|
|
11
17
|
## 16.31.5 (2024-05-06)
|
|
12
18
|
|
|
13
19
|
### Bugfix
|
package/package.json
CHANGED
|
@@ -206,11 +206,6 @@ class View extends Component {
|
|
|
206
206
|
if (this.props.error && this.props.error.code === 301) {
|
|
207
207
|
const redirect = flattenToAppURL(this.props.error.url).split('?')[0];
|
|
208
208
|
return <Redirect to={`${redirect}${this.props.location.search}`} />;
|
|
209
|
-
} else if (this.props.error && this.props.error.status === 302) {
|
|
210
|
-
const redirect = flattenToAppURL(
|
|
211
|
-
this.props.error.response.header.location,
|
|
212
|
-
).split('?')[0];
|
|
213
|
-
return <Redirect to={`${redirect}${this.props.location.search}`} />;
|
|
214
209
|
} else if (this.props.error && !this.props.connectionRefused) {
|
|
215
210
|
let FoundView;
|
|
216
211
|
if (this.props.error.status === undefined) {
|
package/src/helpers/Api/Api.js
CHANGED
|
@@ -3,14 +3,12 @@ import Api from './Api';
|
|
|
3
3
|
|
|
4
4
|
jest.mock('superagent', () => ({
|
|
5
5
|
get: jest.fn((url) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
end: jest.fn(),
|
|
13
|
-
})),
|
|
6
|
+
url,
|
|
7
|
+
query: jest.fn(),
|
|
8
|
+
set: jest.fn(),
|
|
9
|
+
type: jest.fn(),
|
|
10
|
+
send: jest.fn(),
|
|
11
|
+
end: jest.fn(),
|
|
14
12
|
})),
|
|
15
13
|
}));
|
|
16
14
|
|
|
@@ -9,14 +9,12 @@ import Api from './Api';
|
|
|
9
9
|
|
|
10
10
|
jest.mock('superagent', () => ({
|
|
11
11
|
get: jest.fn((url) => ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
end: jest.fn(),
|
|
19
|
-
})),
|
|
12
|
+
url,
|
|
13
|
+
query: jest.fn(),
|
|
14
|
+
set: jest.fn(),
|
|
15
|
+
type: jest.fn(),
|
|
16
|
+
send: jest.fn(),
|
|
17
|
+
end: jest.fn(),
|
|
20
18
|
})),
|
|
21
19
|
}));
|
|
22
20
|
|