xmlsyntax error with entities on Plone template pages like the search page
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xdv |
New
|
Undecided
|
Unassigned |
Bug Description
Using collective.xdv with Plone 4.0b5 generates errors on Plone template pages like 'search'.
Traceback is below.
The rules_parser that is passed in into 'compile_theme' has two resolvers, the InternalResolver and the PythonResolver.
When the 'rules.xml' does not start with a slash, a request is created that should generate a NotFound exception.
However, with the Plone search template this is not the case. The contents of the Plone search page is in the response, containing an —. This is fed into the xml parser further on, generating the XMLSyntaxError (see code in collective.
Workaround is to use the python resolver, luckily it comes before the InternalResolver.
Another workaround is using an absolute filesystem url like:
file://
It would be nice to introduce something like:
file://
Traceback (most recent call last):
File "/home/
newResult = handler.
File "/home/
transform = self.setupTrans
File "/home/
access_
File "/home/
rules_doc = etree.parse(rules, parser=
File "lxml.etree.pyx", line 2706, in lxml.etree.parse (src/lxml/
File "parser.pxi", line 1500, in lxml.etree.
File "parser.pxi", line 1529, in lxml.etree.
File "parser.pxi", line 1429, in lxml.etree.
File "parser.pxi", line 975, in lxml.etree.
File "parser.pxi", line 539, in lxml.etree.
File "parser.pxi", line 625, in lxml.etree.
File "parser.pxi", line 565, in lxml.etree.
XMLSyntaxError: Entity 'mdash' not defined, line 287, column 20
> /home/jan/
Can you check this with the current trunk, I think Marshall may have
fixed this the other day.
Laurence
On 9 August 2010 20:54, Jan Murre <email address hidden> wrote: xdv.utils. InternalResolve r). /full/path/ to/your/ file relative/ path/to/ buildout- dir jan/.buildout/ eggs/plone. transformchain- 1.0b1-py2. 6.egg/plone/ transformchain/ transformer. py", line 42, in __call__ transformIterab le(result, encoding) jan/.buildout/ eggs/collective .xdv-1. 0rc9-py2. 6.egg/collectiv e/xdv/transform .py", line 263, in transformIterable form() jan/.buildout/ eggs/collective .xdv-1. 0rc9-py2. 6.egg/collectiv e/xdv/transform .py", line 221, in setupTransform control= access_ control, jan/.buildout/ eggs/xdv- 0.3-py2. 6.egg/xdv/ compiler. py", line 120, in compile_theme rules_parser) lxml.etree. c:49945) _parseDocument (src/lxml/ lxml.etree. c:71784) _parseDocumentF romURL (src/lxml/ lxml.etree. c:72067) _parseDocFromFi le (src/lxml/ lxml.etree. c:71162) _BaseParser. _parseDocFromFi le (src/lxml/ lxml.etree. c:68160) _ParserContext. _handleParseRes ultDoc (src/lxml/ lxml.etree. c:64244) _handleParseRes ult (src/lxml/ lxml.etree. c:65165) _raiseParseErro r (src/lxml/ lxml.etree. c:64508) zope/knmp. nl/parser. pxi(565) lxml.etree. _raiseParseErro r (src/lxml/ lxml.etree. c:64508) () /bugs.launchpad .net/bugs/ 615530
> Public bug reported:
>
> Using collective.xdv with Plone 4.0b5 generates errors on Plone template
> pages like 'search'.
>
> Traceback is below.
>
> The rules_parser that is passed in into 'compile_theme' has two resolvers, the InternalResolver and the PythonResolver.
> When the 'rules.xml' does not start with a slash, a request is created that should generate a NotFound exception.
>
> However, with the Plone search template this is not the case. The
> contents of the Plone search page is in the response, containing an
> —. This is fed into the xml parser further on, generating the
> XMLSyntaxError (see code in collective.
>
> Workaround is to use the python resolver, luckily it comes before the InternalResolver.
> Another workaround is using an absolute filesystem url like:
>
> file://
>
> It would be nice to introduce something like:
>
> file://
>
>
> Traceback (most recent call last):
> File "/home/
> newResult = handler.
> File "/home/
> transform = self.setupTrans
> File "/home/
> access_
> File "/home/
> rules_doc = etree.parse(rules, parser=
> File "lxml.etree.pyx", line 2706, in lxml.etree.parse (src/lxml/
> File "parser.pxi", line 1500, in lxml.etree.
> File "parser.pxi", line 1529, in lxml.etree.
> File "parser.pxi", line 1429, in lxml.etree.
> File "parser.pxi", line 975, in lxml.etree.
> File "parser.pxi", line 539, in lxml.etree.
> File "parser.pxi", line 625, in lxml.etree.
> File "parser.pxi", line 565, in lxml.etree.
> XMLSyntaxError: Entity 'mdash' not defined, line 287, column 20
>> /home/jan/
>
> ** Affects: xdv
> Importance: Undecided
> Status: New
>
> --
> xmlsyntax error with entities on Plone template pages like the search page
> https:/
> You received this bug notification because you are a member of xdv
> maintainers, which is the registrant for xdv.
>