-
-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Description
Using Plone 6.1/6.2.
In a Classic UI site, create a folder, add a Link CT in it, and set this to an internal url. Publish the folder and the link.
- In the main menu, assuming the navigation is using a dropdown, you will see as link
http://localhost:8080/Plone/folder/link. It does not matter if you are logged in or anonymous. - In the navigation portlet it depends:
- If you are logged in and you are the creator of the link, you will see a link to
http://localhost:8080/Plone/folder/linkso you can click and edit it. - If you are anonymous, or you are logged in but you are not the creator of the link, you will see something like this:
http://localhost:8080/Plone/resolveuid/some-uid.
- If you are logged in and you are the creator of the link, you will see a link to
Problems:
- There is a difference between the main menu and the navigation portlet.
- If you have edit permission on the link, but you are not the original creator, you have to resort to tricks to get to the link object to edit it.
- It is ugly to literally have
resolveuidin the link. - On a live site, the url may include the id of the Plone site:
http://example.com/Plone/resolveuid/some-uid. You get this when your editors can't login on the normal domain, but directly access the Plone port in a VPN. Best seen with ssh port forwarding. The link created above would have asgetRemoteUrlin its brain:/Plone/resolveuid/.... If you would edit it on the live site domain, it would be/resolveuid/.... (In my case the extra/Plonein the url leads to 404 Not Found errors because something in the Apache rules seems to disallow access toexample.com/Plone. This is the main reason I was investigating this.)
Easiest way to solve this, would be to change the SitemapNavtreeStrategy in Products.CMFPlone to always set useRemoteUrl to False. Then the navigation portlet will simply use the url of the link object. I have the code ready.
This seems a minor change. Since this is a change of behaviour, perhaps it is best to only do this in Plone 6.2.
BTW, the code lines that I am editing are largely unchanged since their introduction in 2011, in the fifth ever PR to CMFPlone.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels