From b106e4cb38a8a3d326df77db5b2ff38493d2dbac Mon Sep 17 00:00:00 2001 From: David Glick Date: Mon, 15 Apr 2024 22:19:34 -0600 Subject: [PATCH 1/2] Fix broken link to portrait --- packages/volto/news/2927.bugfix | 1 + .../volto/src/components/manage/Toolbar/PersonalTools.jsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 packages/volto/news/2927.bugfix diff --git a/packages/volto/news/2927.bugfix b/packages/volto/news/2927.bugfix new file mode 100644 index 0000000000..aa681455be --- /dev/null +++ b/packages/volto/news/2927.bugfix @@ -0,0 +1 @@ +Fix broken user portrait in personal tools menu. @davisagli diff --git a/packages/volto/src/components/manage/Toolbar/PersonalTools.jsx b/packages/volto/src/components/manage/Toolbar/PersonalTools.jsx index 6c6a67bae9..0a11e8fd6a 100644 --- a/packages/volto/src/components/manage/Toolbar/PersonalTools.jsx +++ b/packages/volto/src/components/manage/Toolbar/PersonalTools.jsx @@ -10,7 +10,7 @@ import { Icon } from '@plone/volto/components'; import { getUser } from '@plone/volto/actions'; import { Pluggable } from '@plone/volto/components/manage/Pluggable'; import { - flattenToAppURL, + expandToBackendURL, getBaseUrl, userHasRoles, } from '@plone/volto/helpers'; @@ -97,7 +97,7 @@ const PersonalTools = (props) => {
{user.portrait ? ( {intl.formatMessage(messages.userAvatar)} ) : ( From 61cc34c301cd6f71b7304fa463c3111853d4ca9e Mon Sep 17 00:00:00 2001 From: David Glick Date: Mon, 15 Apr 2024 22:26:04 -0600 Subject: [PATCH 2/2] update snapshot --- .../manage/Toolbar/__snapshots__/PersonalTools.test.jsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/volto/src/components/manage/Toolbar/__snapshots__/PersonalTools.test.jsx.snap b/packages/volto/src/components/manage/Toolbar/__snapshots__/PersonalTools.test.jsx.snap index 9c11d88674..5e7695369b 100644 --- a/packages/volto/src/components/manage/Toolbar/__snapshots__/PersonalTools.test.jsx.snap +++ b/packages/volto/src/components/manage/Toolbar/__snapshots__/PersonalTools.test.jsx.snap @@ -423,7 +423,7 @@ exports[`Toolbar Personal Tools component renders an Toolbar Personal Tools comp > user avatar