4

I made a webportal on my mac using plone4.1 and Diazo.

Now, I'm trying to deploy it on my server (CentOs) where there is yet another site with plone4.0.5 + collectivexdv.

When I run the site (in a brand new buildout) with my diazotheme I obtain this lines via shell (instance fg):

2011-09-27 09:32:10 ERROR plone.transformchain Unexpected error whilst trying to apply transform chain
Traceback (most recent call last):
  File "/home/plone/.buildout/eggs/plone.transformchain-1.0-py2.6.egg/plone/transformchain/transformer.py", line 42, in __call__
    newResult = handler.transformIterable(result, encoding)
  File "/home/plone/.buildout/eggs/plone.app.theming-1.0b8-py2.6.egg/plone/app/theming/transform.py", line 205, in transformIterable
    transform = self.setupTransform()
  File "/home/plone/.buildout/eggs/plone.app.theming-1.0b8-py2.6.egg/plone/app/theming/transform.py", line 150, in setupTransform
    xsl_params=xslParams,
  File "/home/plone/.buildout/eggs/diazo-1.0rc3-py2.6.egg/diazo/compiler.py", line 106, in compile_theme
    read_network=read_network,
  File "/home/plone/.buildout/eggs/diazo-1.0rc3-py2.6.egg/diazo/rules.py", line 160, in process_rules
    rules_doc = fixup_themes(rules_doc)
  File "/home/plone/.buildout/eggs/diazo-1.0rc3-py2.6.egg/diazo/utils.py", line 49, in __call__
    result = self.xslt(*args, **kw)
  File "xslt.pxi", line 568, in lxml.etree.XSLT.__call__ (src/lxml/lxml.etree.c:120289)
XSLTApplyError: xsltValueOf: text copy failed

What's the matter?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Vito
  • 1,201
  • 1
  • 10
  • 16
  • possible duplicate of [Plone - XSLTApplyError: xsltValueOf: text copy failed](http://stackoverflow.com/questions/6644695/plone-xsltapplyerror-xsltvalueof-text-copy-failed) – Martijn Pieters Sep 28 '11 at 13:06
  • Please include detail from `.error_messages`[See: errors-and-message](https://lxml.de/xpathxslt.html#errors-and-messages) – dank8 Feb 20 '23 at 14:34

4 Answers4

6

I had the exact same problem and it's due an old libxml2/libxslt. Add these lines on your buildout:

[buildout]
parts =
     lxml # keep lxml as the first one!
     ...
     instance

[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml
libxml2-url = ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz
libxslt-url = ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
static-build = true
force = false
gforcada
  • 2,498
  • 17
  • 26
  • Thank's a lot. I delete all the libxslt/lxml eggs and modified the buildout.cfg, but when I try to bin/buildout I obtain:http://pastie.org/2604751 – Vito Sep 28 '11 at 10:04
  • Your trace says: ./.libs/libxml2.so: undefined reference to `gzopen64' so I'm wondering if you have zlib-devel packages installed – gforcada Sep 28 '11 at 11:00
  • also installing zlib-devel I obtain `./.libs/libxml2.so: undefined reference to `gzopen64' collect2: ld returned 1 exit status ` – Vito Sep 28 '11 at 12:34
5

See Plone - XSLTApplyError: xsltValueOf: text copy failed. Probably you have an outdated libxml, as it is always the case with an old distribution like CentOS.

Use z3c.recipe.staticlxml.

Community
  • 1
  • 1
3

I just got this to work using Plone 4.2.1 on OS X 10.8 Server but only once I used the unified installer. I bumped up the libxml2 to version 2.8.0. At the time I tried this, libxml2 version 2.9.0 was broken for OS X 10.8.

Furqan Safdar
  • 16,260
  • 13
  • 59
  • 93
Webb
  • 31
  • 1
3

It sounds like you might have overly old versions of libxml2 and/or libxslt. I encountered identical problems with libxml2 2.6.26 and libxslt 1.1.17. After upgrading to 2.7.8 and 1.2.26 (respectively) the problems went away.

If you can't upgrade the libraries locally, you can move forward quite quickly using the "z3c.recipe.staticlxml" recipe in your buildout:

[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml

Just remember to delete any existing lxml egg in the eggs directory (or possibly in your ~/.buildout/eggs cache, depending on how your ~/.buildout/default.cfg it set up) first.

nutjob
  • 51
  • 3