Deployments not rooted fail to load the Fontello icons

IMHO the problem is not in rooted/non rooted. In css, resources are relative to the css that declares them. So, if the css is:

/++plone++production/++unique++2022-03-31T04:05:17.238056/default.css

then fontello mus be loaded as

../../ (-> ++unique++ -> ++plone++production) ++plone++static/fonts/plone-fontello.woff

I don't understand what is so complicated. We also have preprocessors, so use them to set the levels of ../../ (plone 6 needs 3 ../) in css. This is not a bug but mismanagement due to abuse of traversal.

++production++, ++static++, ++webresources++ are not regular objects to traverse, you will get a lot of insufficient privileges if you rely on it.

We've the same problem in Diazo when using alternative config loaded (see backend.xml in barceloneta Plone 6, backend.xml. <link rel="stylesheet" href="++theme++barceloneta/css/barceloneta.css" /> fails if the content is private · Issue #261 · plone/plonetheme.barceloneta · GitHub) using relative path. In Diazo there's no root concept but Diazo knows how to handle relative links to the ++mytheme++ namespace, which is 1 level below root.

These bugs exists because we want to handle them with Acquisition, which is wrong and unneeded in this case because we know the paths (actually we create them, so...).

1 Like