Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remoteUrl value for non Creators backport to 4.x.x #186

Merged
merged 4 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/159.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Resolve UID-based internal links in navigation tabs. @ichim-david
3 changes: 2 additions & 1 deletion src/plone/volto/browser/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from Missing import Missing
from plone.app.layout.navigation.root import getNavigationRoot
from plone.registry.interfaces import IRegistry
from plone.restapi.serializer.utils import uid_to_url
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone import utils
from Products.CMFPlone.browser.interfaces import INavigationTabs
Expand Down Expand Up @@ -90,7 +91,7 @@ def topLevelTabs(self, actions=None, category="portal_tabs"):

def _get_url(item):
if item.getRemoteUrl and not member == item.Creator:
return (get_id(item), item.getRemoteUrl)
return (get_id(item), uid_to_url(item.getRemoteUrl))
return get_view_url(item)

context_path = "/".join(context.getPhysicalPath())
Expand Down