@plone/volto 17.0.0-alpha.8 → 17.0.0-alpha.9

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.
Binary file
package/CHANGELOG.md CHANGED
@@ -8,6 +8,19 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 17.0.0-alpha.9 (2023-06-01)
12
+
13
+ ### Bugfix
14
+
15
+ - Fix special characters in request urls @pnicolli @mamico @luca-bellenghi @cekk [#4825](https://github.com/plone/volto/issues/4825)
16
+ - Fix block is undefined in StyleWrapper helper when building classnames @sneridagh [#4827](https://github.com/plone/volto/issues/4827)
17
+ - Fix navigation sections in 404 pages @sneridagh [#4836](https://github.com/plone/volto/issues/4836)
18
+
19
+ ### Documentation
20
+
21
+ - Fix glossary warning due to lack of empty line before a term. @stevepiercy [#4820](https://github.com/plone/volto/issues/4820)
22
+
23
+
11
24
  ## 17.0.0-alpha.8 (2023-05-24)
12
25
 
13
26
  ### Feature
@@ -225,6 +238,24 @@
225
238
  - Use a universal static path for both documentation and volto repos. @stevepiercy [#4376](https://github.com/plone/volto/issues/4376)
226
239
 
227
240
 
241
+ ## 16.20.7 (2023-05-24)
242
+
243
+ ### Bugfix
244
+
245
+ - Fixed the issue "shouldn't use a hook like function name for a variable" @Kaku-g [#4693](https://github.com/plone/volto/issues/4693)
246
+ - Fix to not update breadrumbs, navigation, actions, and types when content is fetched as a subrequest and apiExpanders includes these components. @davisagli [#4760](https://github.com/plone/volto/issues/4760)
247
+ - Fix bug where editors could not see their own content in the Contents view if it was expired or has a future effective date. @davisagli [#4764](https://github.com/plone/volto/issues/4764)
248
+ - Fix bug showing logs at the browsers when richtext widget is use @claytonc [#4780](https://github.com/plone/volto/issues/4780)
249
+ - Add guard in case of malformed blocks are present (at least id and title should be present) @sneridagh [#4802](https://github.com/plone/volto/issues/4802)
250
+ - Fix html tag lang attribute in SSR @sneridagh [#4803](https://github.com/plone/volto/issues/4803)
251
+ - Add newest supported languages to `Language` constants list @sneridagh [#4811](https://github.com/plone/volto/issues/4811)
252
+
253
+ ### Internal
254
+
255
+ - Remove max_line_length from .editorconfig @pnicolli [#4776](https://github.com/plone/volto/issues/4776)
256
+ - Fix unannounced breaking change in cypress-io/github-action @sneridagh [#4795](https://github.com/plone/volto/issues/4795)
257
+
258
+
228
259
  ## 16.20.6 (2023-05-12)
229
260
 
230
261
  ### Bugfix
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "17.0.0-alpha.8",
12
+ "version": "17.0.0-alpha.9",
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": "17.0.0-alpha.8",
3
+ "version": "17.0.0-alpha.9",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -1,53 +1,67 @@
1
- /**
2
- * Home container.
3
- * @module components/theme/NotFound/NotFound
4
- */
5
-
6
- import React from 'react';
1
+ import { useEffect } from 'react';
2
+ import { BodyClass, toBackendLang } from '@plone/volto/helpers';
7
3
  import { FormattedMessage } from 'react-intl';
8
4
  import { Link } from 'react-router-dom';
9
5
  import { Container } from 'semantic-ui-react';
10
6
  import { withServerErrorCode } from '@plone/volto/helpers/Utils/Utils';
7
+ import { useDispatch, useSelector } from 'react-redux';
8
+ import { getNavigation } from '@plone/volto/actions';
9
+ import config from '@plone/volto/registry';
11
10
 
12
11
  /**
13
12
  * Not found function.
14
13
  * @function NotFound
15
14
  * @returns {string} Markup of the not found page.
16
15
  */
17
- const NotFound = () => (
18
- <Container className="view-wrapper">
19
- <h1>
20
- <FormattedMessage
21
- id="This page does not seem to exist…"
22
- defaultMessage="This page does not seem to exist…"
23
- />
24
- </h1>
25
- <p className="description">
26
- <FormattedMessage
27
- id="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
28
- defaultMessage="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
29
- />
30
- </p>
31
- <p>
32
- <FormattedMessage
33
- id="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
34
- defaultMessage="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
35
- values={{
36
- site_admin: (
37
- <Link to="/contact-form">
38
- <FormattedMessage
39
- id="Site Administration"
40
- defaultMessage="Site Administration"
41
- />
42
- </Link>
43
- ),
44
- }}
45
- />
46
- </p>
47
- <p>
48
- <FormattedMessage id="Thank you." defaultMessage="Thank you." />
49
- </p>
50
- </Container>
51
- );
16
+ const NotFound = () => {
17
+ const dispatch = useDispatch();
18
+ const lang = useSelector((state) => state.intl.locale);
19
+
20
+ useEffect(() => {
21
+ dispatch(
22
+ getNavigation(
23
+ config.settings.isMultilingual ? `/${toBackendLang(lang)}` : '/',
24
+ config.settings.navDepth,
25
+ ),
26
+ );
27
+ }, [dispatch, lang]);
28
+
29
+ return (
30
+ <Container className="view-wrapper">
31
+ <BodyClass className="page-not-found" />
32
+ <h1>
33
+ <FormattedMessage
34
+ id="This page does not seem to exist…"
35
+ defaultMessage="This page does not seem to exist…"
36
+ />
37
+ </h1>
38
+ <p className="description">
39
+ <FormattedMessage
40
+ id="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
41
+ defaultMessage="We apologize for the inconvenience, but the page you were trying to access is not at this address. You can use the links below to help you find what you are looking for."
42
+ />
43
+ </p>
44
+ <p>
45
+ <FormattedMessage
46
+ id="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
47
+ defaultMessage="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
48
+ values={{
49
+ site_admin: (
50
+ <Link to="/contact-form">
51
+ <FormattedMessage
52
+ id="Site Administration"
53
+ defaultMessage="Site Administration"
54
+ />
55
+ </Link>
56
+ ),
57
+ }}
58
+ />
59
+ </p>
60
+ <p>
61
+ <FormattedMessage id="Thank you." defaultMessage="Thank you." />
62
+ </p>
63
+ </Container>
64
+ );
65
+ };
52
66
 
53
67
  export default withServerErrorCode(404)(NotFound);
@@ -44,7 +44,13 @@ const RenderBlocks = (props) => {
44
44
  });
45
45
 
46
46
  return Block ? (
47
- <StyleWrapper key={block} {...props} id={block} data={blockData}>
47
+ <StyleWrapper
48
+ key={block}
49
+ {...props}
50
+ id={block}
51
+ block={block}
52
+ data={blockData}
53
+ >
48
54
  <Block
49
55
  id={block}
50
56
  metadata={metadata}
@@ -89,7 +89,7 @@ class Api {
89
89
  checkUrl &&
90
90
  request.url &&
91
91
  request.xhr &&
92
- stripQuerystring(request.url) !==
92
+ encodeURI(stripQuerystring(request.url)) !==
93
93
  stripQuerystring(request.xhr.responseURL)
94
94
  ) {
95
95
  if (request.xhr.responseURL?.length === 0) {