plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
240 stars 183 forks source link

Diazo bundle missing data-bundle="diazo" in Plone Classic UI #3893

Closed yurj closed 6 months ago

yurj commented 6 months ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

With Plone 6.X and the new RR, attribute data-bundle="diazo" is missing from the html for diazo bundles, which actually hosts local themes javascript and css. All other bundle has actually data-bundle attribute set, only the diazo bundle is missing it.

What I did:

Used backed.xml (https://github.com/plone/plonetheme.barceloneta/blob/master/plonetheme/barceloneta/theme/backend.xml) to use Barceloneta Theme in Plone Classic UI backend

What I expect to happen:

Backend has Barceloneta style

What actually happened:

Both Barceloneta and local theme are applied, because this backend.xml rule don't apply to diazo bundle because of the missing data-bundle attribute:

    <!-- CSS -->
    <drop css:content="head link[data-bundle='diazo']" />
[...]

    <!-- Script -->
    <drop css:content="head script[data-bundle='diazo']" />

What version of Plone/ Addons I am using:

Plain Plone Classic UI

I've added these 2 pull requests to fix this bug, for Plone 6.0 and Plone 6.1 (main branch):

https://github.com/plone/Products.CMFPlone/pull/3890

https://github.com/plone/Products.CMFPlone/pull/3889

This PRs also add the data-bundle="plonecustomcss" for the @@customcss stylesheet link tag.

yurj commented 6 months ago

Above PRs merged