Plone-compile-resources fails for resourceDirectory using layer

Folks, unrestrictedTraverse() to a resource directory fails in plone-compile-resources (in Products.CMFPlone master / ~5.1b4) for any browser:resourceDirectory declaring a product-specific layer interface. Likewise, without additional steps (??) unrestrictedTraverse() won't traverse to these resource directories in run scripts and ./bin/instance debug sessions.

This breaks plone-compile-resources completely for any site with add-ons doing this, even if the add-ons have nothing to do with the bundle you are building.

I am unsure how to load browser layers registered for a site programmatically (for run scripts like and similar), otherwise I would attempt to fix this (assuming ObjectManager.unrestrictedTraverse() will play nice with that?). Thoughts? I would like to find a way to fix this before 5.1 is released.


Following-up: a fix for this is now merged in this PR to Products.CMFPlone.

1 Like