[ZCM] [ZC] 2299/ 3 Comment "TextIndex error on multi-line code examples"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Sat, 24 Mar 2007 20:57:57 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #2299 Update (Comment) "TextIndex error on multi-line code examples"
Status Pending, Catalog/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/2299
==============================================================
= Comment - Entry #3 by tseaver on Mar 24, 2007 8:57 pm
First, the traceback shown in that issue is for an error in the *search string*, not while indexing the body text::
Module Products.PluginIndexes?.TextIndex?.TextIndex?, line 490, in _apply_index
Module Products.PluginIndexes?.TextIndex?.TextIndex?, line 547, in query
Module Products.PluginIndexes?.TextIndex?.TextIndex?, line 668, in parse
Module Products.PluginIndexes?.TextIndex?.TextIndex?, line 732, in quotes
The 'quotes' function is only called while parsing a query
against the index, never while indexing a piece of content.
I verified this by creating and searching a TextIndex using
a DTMLDocument containing the string you supplied: because
my search terms did not contain quotes, I had no problems.
Second, why are you using a TextIndex at all, rather than
a ZCTextIndex?
________________________________________
= Comment - Entry #2 by limi on Mar 24, 2007 6:49 pm
Forgot the original version info, sorry:
Zope version: (Zope 2.9.4-final, python 2.4.3, linux2)
________________________________________
= Request - Entry #1 by limi on Mar 24, 2007 6:48 pm
>From http://dev.plone.org/plone/ticket/5990
"""
When I place this in a <pre/> tag and save, Zope is fine with it:
<pre>tal:condition="results"</pre>
However, when I do a multi-line <pre/> tag, which contains quotes spread out on different lines, line this one:
<pre>tal:condition="python:test(not site_properties.allowAnonymousView
and site_properties.portal_membership.isAnonymousUser(), 0, 1)"</pre>
... Zope breaks on saving the file with the error TextIndex.QueryError: Mismatched quotes.
"""
Full traceback is available at http://dev.plone.org/plone/ticket/5990
==============================================================