Hello group,
I'm encountering an unexpected portal_transforms + diazo problem following an OS upgrade:
- Plone version is 5.2.12 on Python 3.9.
- OS version went from FreeBSD 13.3 to 13.5, and packages were updated accordingly (among which, libxml2 and libxslt).
As a result, lxml stopped working (couldn't find shared libxml2 libraries files).
I decided to rebuild the buildout. On my server, lxml 4.8.0 doesn't compile with the default compiler (clang / LLVM 19), but seems to compile with GCC 13. lxml 5.0.x, on the other hand, does compiles with clang.
Whatever the version, the theming engine no longer works for me:
2025-07-05 17:03:49,592 ERROR [plone.transformchain:69][waitress-3] Unexpected error whilst trying to apply transform chain
Traceback (most recent call last):
File "/usr/local/plone/buildout/buildout-cache/eggs/cp39/plone.transformchain-2.0.2-py3.9.egg/plone/transformchain/transformer.py", line 59, in __call__
newResult = handler.transformIterable(result, encoding)
File "/usr/local/plone/buildout/buildout-cache/eggs/cp39/plone.app.theming-4.1.8-py3.9.egg/plone/app/theming/transform.py", line 166, in transformIterable
transform = self.setupTransform(runtrace=runtrace)
File "/usr/local/plone/buildout/buildout-cache/eggs/cp39/plone.app.theming-4.1.8-py3.9.egg/plone/app/theming/transform.py", line 92, in setupTransform
transform = compileThemeTransform(
File "/usr/local/plone/buildout/buildout-cache/eggs/cp39/plone.app.theming-4.1.8-py3.9.egg/plone/app/theming/utils.py", line 717, in compileThemeTransform
compiledTheme = compile_theme(
File "/usr/local/plone/buildout/buildout-cache/eggs/cp39/diazo-2.0.1-py3.9.egg/diazo/compiler.py", line 127, in compile_theme
rules_doc = process_rules(
File "/usr/local/plone/buildout/buildout-cache/eggs/cp39/diazo-2.0.1-py3.9.egg/diazo/rules.py", line 300, in process_rules
rules_doc = etree.parse(rules, parser=rules_parser)
File "src/lxml/etree.pyx", line 3549, in lxml.etree.parse
File "src/lxml/parser.pxi", line 1966, in lxml.etree._parseDocument
File "src/lxml/parser.pxi", line 1992, in lxml.etree._parseDocumentFromURL
File "src/lxml/parser.pxi", line 1895, in lxml.etree._parseDocFromFile
File "src/lxml/parser.pxi", line 1214, in lxml.etree._BaseParser._parseDocFromFile
File "src/lxml/parser.pxi", line 650, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 760, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 687, in lxml.etree._raiseParseError
OSError: Error reading file '/++theme++my-theme/rules.xml': Invalid argument
In the manifest.cfg file of my theme, I've tried to change the value for "rules":
- Values like "http://localhost:8081/.../rules.xml" are not accepted (network access)
- Values like "
/usr/local/plone/.../rules.xml" are not accepted (filesystem access)
The module refusing these values is plone.app.theming.utils, despite its doc stating that it accepts URLs.
I've also tried upgrading Diazo (tried 1.5.0 and 2.0.0).
Would anyone have ideas about how to correct the problem?
Many thanks in advance,
Laurent.