@plone/volto 16.31.4 → 16.31.5

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 CHANGED
@@ -1,8 +1,12 @@
1
- ## 16.31.4 (2024-03-18)
1
+ ## 16.31.5 (2024-05-06)
2
2
 
3
3
  ### Bugfix
4
4
 
5
- - (fix): make search block sort and facets work on edit @dobri1408 [#5262](https://github.com/plone/volto/issues/5262)
6
- - Fix Link to Item and Aliases view not updating content in multilingual site. @iFlameing [#5820](https://github.com/plone/volto/issues/5820)
5
+ - Fix image disappears after pressing the Enter key on title field in image content-type. @iFlameing [#5973](https://github.com/plone/volto/issues/5973)
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)
7
11
 
8
12
 
Binary file
package/CHANGELOG.md CHANGED
@@ -8,6 +8,17 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 16.31.5 (2024-05-06)
12
+
13
+ ### Bugfix
14
+
15
+ - Fix image disappears after pressing the Enter key on title field in image content-type. @iFlameing [#5973](https://github.com/plone/volto/issues/5973)
16
+ - Fix 301 and 302 redirects. @robgietema [#6001](https://github.com/plone/volto/issues/6001)
17
+
18
+ ### Documentation
19
+
20
+ - Block search engines from indexing content on Netlify preview builds. @stevepiercy [#5916](https://github.com/plone/volto/issues/5916)
21
+
11
22
  ## 16.31.4 (2024-03-18)
12
23
 
13
24
  ### Bugfix
package/netlify.toml CHANGED
@@ -3,3 +3,7 @@
3
3
  NODE_VERSION = "16.17.1"
4
4
  [build]
5
5
  ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./docs/"
6
+ [[headers]]
7
+ for = "/*"
8
+ [[headers.values]]
9
+ X-Robots-Tag = "none"
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "16.31.4",
12
+ "version": "16.31.5",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "16.31.4",
3
+ "version": "16.31.5",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -173,6 +173,7 @@ const FileWidget = (props) => {
173
173
  {value && value.filename}
174
174
  {value && (
175
175
  <Button
176
+ type="button"
176
177
  icon
177
178
  basic
178
179
  className="delete-button"
@@ -206,6 +206,11 @@ 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}`} />;
209
214
  } else if (this.props.error && !this.props.connectionRefused) {
210
215
  let FoundView;
211
216
  if (this.props.error.status === undefined) {
@@ -54,7 +54,7 @@ class Api {
54
54
  ) => {
55
55
  let request;
56
56
  let promise = new Promise((resolve, reject) => {
57
- request = superagent[method](formatUrl(path));
57
+ request = superagent[method](formatUrl(path)).redirects(0);
58
58
 
59
59
  if (params) {
60
60
  request.query(params);
@@ -3,12 +3,14 @@ import Api from './Api';
3
3
 
4
4
  jest.mock('superagent', () => ({
5
5
  get: jest.fn((url) => ({
6
- url,
7
- query: jest.fn(),
8
- set: jest.fn(),
9
- type: jest.fn(),
10
- send: jest.fn(),
11
- end: jest.fn(),
6
+ redirects: jest.fn(() => ({
7
+ url,
8
+ query: jest.fn(),
9
+ set: jest.fn(),
10
+ type: jest.fn(),
11
+ send: jest.fn(),
12
+ end: jest.fn(),
13
+ })),
12
14
  })),
13
15
  }));
14
16
 
@@ -9,12 +9,14 @@ import Api from './Api';
9
9
 
10
10
  jest.mock('superagent', () => ({
11
11
  get: jest.fn((url) => ({
12
- url,
13
- query: jest.fn(),
14
- set: jest.fn(),
15
- type: jest.fn(),
16
- send: jest.fn(),
17
- end: jest.fn(),
12
+ redirects: jest.fn(() => ({
13
+ url,
14
+ query: jest.fn(),
15
+ set: jest.fn(),
16
+ type: jest.fn(),
17
+ send: jest.fn(),
18
+ end: jest.fn(),
19
+ })),
18
20
  })),
19
21
  }));
20
22