Open laulaz opened 1 year ago
Why not use the resource registry directly: (untested!)
++resource++my.theme/override-bundle.js
)<records
prefix="plone.bundles/original-bundle-id"
interface='Products.CMFPlone.interfaces.IBundleRegistry'>
<value key="enabled">True</value>
<value key="depends"></value>
<value key="load_async">False</value>
<value key="load_defer">False</value>
<value key="jscompilation">++resource++my.theme/override-bundle.js</value>
<value key="csscompilation"></value>
</records>
note: make sure the original registration is loaded before your package registration
@petschki thank you for your answer 🙏 Of course we can do that (and we did in our customer project, we transformed the override into a custom owned bundle).
With this issue, I just wanted to point out that there is (IMHO) a usecase regression for z3c.jbot.
Maybe it is because it is no longer using resources_overrides?
I'm unable to create something here: https://6-classic.demo.plone.org/portal_resources/resource_overrides/manage_main
using the RR control panel, so I think you cannot override it anymore with z3c.jbot.
is this still valid?
@jensens unfortunately yes, still valid (tested on Plone 6.0.2)
What I did:
We had a JS override in our product, using
z3c.jbot
. The purpose was to overrideplone.gallery/browser/static/dist/spotlight.bundle.js
which is registered in portal resources.We have defined an overrides folder, containing the file
plone.gallery.browser.static.dist.spotlight.bundle.js
.It was working great in Plone 6.0.0a3
What actually happened:
In Plone 6.0.0rc2, our script tag became :
The override is not working anymore, because of the sha384 integrity check on the resource :
src
URLThis results in an error in browser console & blocking of the resource :
What version of Plone/ Addons I am using:
Plone 6.0.0rc2
Does anyone else has this problem ? Maybe overriding resources like this should not be done anymore ?