Help resolve blocker for Plone 5.2

Hey Plonistas,

You all wait for Plone 5.2 to finally be released. But there is still a blocker that needs to be fixed first and we could really need some help:

Registering allowed_attributes and allowed_interface in BrowserViews is broken in Zope 4. See https://github.com/zopefoundation/Zope/issues/397 and the discussion in https://github.com/zopefoundation/Zope/pull/610. That's a tough one resulting from a mayor refactoring of BrowserView in Products.Five dating back to 2012.

This feature is used very rarely in Plone but break least two features: Stealing locks for locked items and enabling ical-import for folders.

The question is: Can we fix this or should we release knowing (at least) these two features are broken?

I think it should be fixed. Topics about Helperviews, e.g. Expressions, and Changes in the Layout Policy, e.g. extending CSS-Classes for body-tag, are available in the Docs.

See the Examples in the Docs:
https://docs.plone.org/adapt-and-extend/theming/templates_css/css.html#generating-css-classes-programmatically-in-templates
https://docs.plone.org/adapt-and-extend/theming/templates_css/css.html#adding-new-css-body-classes

Hi folks - let's not ask Philip to try to fix this on his own... he's done a superhuman job already, so all you brainiacs out there: please jump in! At least give us a sign you're taking a stab at it so it doesn't feel quite so lonely. :confused:

The lock stealing breakage is a definite blocker.

@1letter I think this is not related to helper views or attributes on the body class.

But why I'm responding, the Plone documentation section you refer to is outdated. Also for other who read this: since Plone 5.1 you can use an IBodyClassAdapter from plone.app.layout to register your own extensions to the body class attribute without having to override the complete LayoutPolicy. As an example, see this part in plone.app.mosaic, but it is using the first implementation: https://github.com/plone/plone.app.mosaic/blob/master/src/plone/app/mosaic/layoutpolicy.py

The part that polls all the registered IBodyClassAdapters is here: https://github.com/plone/plone.app.layout/blob/3c9a77db9d5aa3c401551dfc8bde26106143ef38/plone/app/layout/globals/layout.py#L319-L331

This allows you to register extra bodyclass adapters but also have access to the view and template to calculate them.

1 Like

Good to know, thanks! :slight_smile:

The "Reply" functionality of plone.app.discussion is broken in 5.2RC3 - verified on muliple 5.2 systems. A blocker for me...