Skip to content

Commit

Permalink
Merge branch 'master' into allow-deselect-color-in-ColorPickerWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess authored Jun 1, 2023
2 parents 2b71f12 + b208d9e commit a3ec5c1
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 46 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@

<!-- towncrier release notes start -->

## 17.0.0-alpha.9 (2023-06-01)

### Bugfix

- Fix special characters in request urls @pnicolli @mamico @luca-bellenghi @cekk [#4825](https://github.com/plone/volto/issues/4825)
- Fix block is undefined in StyleWrapper helper when building classnames @sneridagh [#4827](https://github.com/plone/volto/issues/4827)
- Fix navigation sections in 404 pages @sneridagh [#4836](https://github.com/plone/volto/issues/4836)

### Documentation

- Fix glossary warning due to lack of empty line before a term. @stevepiercy [#4820](https://github.com/plone/volto/issues/4820)


## 17.0.0-alpha.8 (2023-05-24)

### Feature
Expand Down
1 change: 0 additions & 1 deletion news/4820.documentation

This file was deleted.

1 change: 0 additions & 1 deletion news/4825.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion news/4827.bugfix

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"license": "MIT",
"version": "17.0.0-alpha.8",
"version": "17.0.0-alpha.9",
"repository": {
"type": "git",
"url": "git@github.com:plone/volto.git"
Expand Down
2 changes: 1 addition & 1 deletion packages/volto-slate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plone/volto-slate",
"version": "17.0.0-alpha.8",
"version": "17.0.0-alpha.9",
"description": "Slate.js integration with Volto",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
96 changes: 55 additions & 41 deletions src/components/theme/NotFound/NotFound.jsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,67 @@
/**
* Home container.
* @module components/theme/NotFound/NotFound
*/

import React from 'react';
import { useEffect } from 'react';
import { BodyClass, toBackendLang } from '@plone/volto/helpers';
import { FormattedMessage } from 'react-intl';
import { Link } from 'react-router-dom';
import { Container } from 'semantic-ui-react';
import { withServerErrorCode } from '@plone/volto/helpers/Utils/Utils';
import { useDispatch, useSelector } from 'react-redux';
import { getNavigation } from '@plone/volto/actions';
import config from '@plone/volto/registry';

/**
* Not found function.
* @function NotFound
* @returns {string} Markup of the not found page.
*/
const NotFound = () => (
<Container className="view-wrapper">
<h1>
<FormattedMessage
id="This page does not seem to exist…"
defaultMessage="This page does not seem to exist…"
/>
</h1>
<p className="description">
<FormattedMessage
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."
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."
/>
</p>
<p>
<FormattedMessage
id="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
defaultMessage="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
values={{
site_admin: (
<Link to="/contact-form">
<FormattedMessage
id="Site Administration"
defaultMessage="Site Administration"
/>
</Link>
),
}}
/>
</p>
<p>
<FormattedMessage id="Thank you." defaultMessage="Thank you." />
</p>
</Container>
);
const NotFound = () => {
const dispatch = useDispatch();
const lang = useSelector((state) => state.intl.locale);

useEffect(() => {
dispatch(
getNavigation(
config.settings.isMultilingual ? `/${toBackendLang(lang)}` : '/',
config.settings.navDepth,
),
);
}, [dispatch, lang]);

return (
<Container className="view-wrapper">
<BodyClass className="page-not-found" />
<h1>
<FormattedMessage
id="This page does not seem to exist…"
defaultMessage="This page does not seem to exist…"
/>
</h1>
<p className="description">
<FormattedMessage
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."
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."
/>
</p>
<p>
<FormattedMessage
id="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
defaultMessage="If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
values={{
site_admin: (
<Link to="/contact-form">
<FormattedMessage
id="Site Administration"
defaultMessage="Site Administration"
/>
</Link>
),
}}
/>
</p>
<p>
<FormattedMessage id="Thank you." defaultMessage="Thank you." />
</p>
</Container>
);
};

export default withServerErrorCode(404)(NotFound);

0 comments on commit a3ec5c1

Please sign in to comment.