@plone/volto 16.31.3 → 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 +7 -2
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +18 -0
- package/netlify.toml +4 -0
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/src/components/manage/Aliases/Aliases.jsx +8 -2
- package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +8 -2
- package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +2 -2
- package/src/components/manage/LinksToItem/LinksToItem.jsx +2 -2
- package/src/components/manage/Widgets/FileWidget.jsx +1 -0
- package/src/components/theme/View/View.jsx +5 -0
- package/src/helpers/Api/Api.js +1 -1
- package/src/helpers/Api/Api.plone.rest.test.js +8 -6
- package/src/helpers/Api/Api.test.js +8 -6
package/.changelog.draft
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
## 16.31.
|
|
1
|
+
## 16.31.5 (2024-05-06)
|
|
2
2
|
|
|
3
3
|
### Bugfix
|
|
4
4
|
|
|
5
|
-
- Fix
|
|
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)
|
|
6
11
|
|
|
7
12
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,24 @@
|
|
|
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
|
+
|
|
22
|
+
## 16.31.4 (2024-03-18)
|
|
23
|
+
|
|
24
|
+
### Bugfix
|
|
25
|
+
|
|
26
|
+
- (fix): make search block sort and facets work on edit @dobri1408 [#5262](https://github.com/plone/volto/issues/5262)
|
|
27
|
+
- Fix Link to Item and Aliases view not updating content in multilingual site. @iFlameing [#5820](https://github.com/plone/volto/issues/5820)
|
|
28
|
+
|
|
11
29
|
## 16.31.3 (2024-03-06)
|
|
12
30
|
|
|
13
31
|
### Bugfix
|
package/netlify.toml
CHANGED
package/package.json
CHANGED
|
@@ -20,7 +20,12 @@ import {
|
|
|
20
20
|
} from 'semantic-ui-react';
|
|
21
21
|
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
|
22
22
|
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
removeAliases,
|
|
25
|
+
addAliases,
|
|
26
|
+
getAliases,
|
|
27
|
+
getContent,
|
|
28
|
+
} from '@plone/volto/actions';
|
|
24
29
|
|
|
25
30
|
import { Icon, Toolbar } from '@plone/volto/components';
|
|
26
31
|
|
|
@@ -96,6 +101,7 @@ class Aliases extends Component {
|
|
|
96
101
|
datetime: '',
|
|
97
102
|
batchSize: '',
|
|
98
103
|
});
|
|
104
|
+
this.props.getContent(getBaseUrl(this.props.pathname));
|
|
99
105
|
this.setState({ isClient: true });
|
|
100
106
|
}
|
|
101
107
|
|
|
@@ -351,6 +357,6 @@ export default compose(
|
|
|
351
357
|
pathname: props.location.pathname,
|
|
352
358
|
title: state.content.data?.title || '',
|
|
353
359
|
}),
|
|
354
|
-
{ addAliases, getAliases, removeAliases },
|
|
360
|
+
{ addAliases, getAliases, removeAliases, getContent },
|
|
355
361
|
),
|
|
356
362
|
)(Aliases);
|
|
@@ -63,9 +63,15 @@ const SearchBlockEdit = (props) => {
|
|
|
63
63
|
const { query = {} } = data || {};
|
|
64
64
|
// We don't need deep compare here, as this is just json serializable data.
|
|
65
65
|
const deepQuery = JSON.stringify(query);
|
|
66
|
+
|
|
66
67
|
useEffect(() => {
|
|
67
|
-
onTriggerSearch(
|
|
68
|
-
|
|
68
|
+
onTriggerSearch(
|
|
69
|
+
'',
|
|
70
|
+
data?.facets,
|
|
71
|
+
data?.query?.sort_on,
|
|
72
|
+
data?.query?.sort_order,
|
|
73
|
+
);
|
|
74
|
+
}, [deepQuery, onTriggerSearch, data]);
|
|
69
75
|
|
|
70
76
|
return (
|
|
71
77
|
<>
|
|
@@ -382,12 +382,12 @@ const withSearch = (options) => (WrappedComponent) => {
|
|
|
382
382
|
query: data.query || {},
|
|
383
383
|
facets: toSearchFacets || facets,
|
|
384
384
|
searchText: toSearchText ? toSearchText.trim() : '',
|
|
385
|
-
sortOn: toSortOn ||
|
|
385
|
+
sortOn: toSortOn || undefined,
|
|
386
386
|
sortOrder: toSortOrder || sortOrder,
|
|
387
387
|
facetSettings,
|
|
388
388
|
});
|
|
389
389
|
if (toSearchFacets) setFacets(toSearchFacets);
|
|
390
|
-
if (toSortOn) setSortOn(toSortOn);
|
|
390
|
+
if (toSortOn) setSortOn(toSortOn || undefined);
|
|
391
391
|
if (toSortOrder) setSortOrder(toSortOrder);
|
|
392
392
|
setSearchData(searchData);
|
|
393
393
|
setLocationSearchData(getSearchFields(searchData));
|
|
@@ -57,8 +57,8 @@ const LinksToItem = (props) => {
|
|
|
57
57
|
}, [dispatch, itempath]);
|
|
58
58
|
|
|
59
59
|
useEffect(() => {
|
|
60
|
-
|
|
61
|
-
}, [dispatch, itempath
|
|
60
|
+
dispatch(getContent(itempath));
|
|
61
|
+
}, [dispatch, itempath]);
|
|
62
62
|
|
|
63
63
|
let links = {};
|
|
64
64
|
if (myrelations) {
|
|
@@ -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) {
|
package/src/helpers/Api/Api.js
CHANGED
|
@@ -3,12 +3,14 @@ import Api from './Api';
|
|
|
3
3
|
|
|
4
4
|
jest.mock('superagent', () => ({
|
|
5
5
|
get: jest.fn((url) => ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|