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

No sub site control panels with Plone >= 5.2 #2

Open
thomasmassmann opened this issue Jul 14, 2021 · 3 comments
Open

No sub site control panels with Plone >= 5.2 #2

thomasmassmann opened this issue Jul 14, 2021 · 3 comments
Labels

Comments

@thomasmassmann
Copy link
Member

Starting with Plone 5.2.0 all control panels are shown for sub sites, and the URLs point to the main site control panels.

Manually opening a URL of a control panel within a sub site works, and so does storing individual records for the main and sub sites.

Is it possible that the URL expression (e.g. string:${object/aq_parent/absolute_url}/@@site-controlpanel) is the problem with the aq_parent (same with the condition like not:object/aq_parent/@@lineageutils/isChildSite)?

@thomasmassmann
Copy link
Member Author

So the difference seems to be the object and request in Plone 5.2.

In Plone 5.1, we get the following:

object: <PloneControlPanel at /Plone/portal_controlpanel used for /Plone/subsite-1>
request: <HTTPRequest, URL=http://localhost:8080/Plone/subsite-1/@@overview-controlpanel>

The object here has this used for, which resolves the correct parent.

In Plone 5.2 we have:

object: <PloneControlPanel at /Plone/portal_controlpanel>
request: <WSGIRequest, URL=http://localhost:8080/Plone/subsite-1/@@overview-controlpanel>

@thomasmassmann
Copy link
Member Author

For Plone >= 5.2 the only solution I found to get the navigation root is by using something like string:${plone_portal_state/navigation_root_url}/@@site-controlpanel for the “Action”. Unfortunately, the PloneControlpanel does not support the extended expression context provided by the PloneBaseTool, so plone_portal_state is not available.

A ticket for Plone has been created at plone/Products.CMFPlone#3288.

A patch is available with https://github.com/cusyio/cusy.patches.cmfplone/

@jensens does this sound reasonable or do you have another solution to get the navigation root in Plone 5.2?

@jensens
Copy link
Member

jensens commented Jul 23, 2021

I agree! Same for Plone 6 I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants