Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ParseError: Token 'EOF' required, u'(' found" when doing api.content.find(Title='(test)') #380

Open
idgserpro opened this issue Aug 8, 2017 · 1 comment

Comments

@idgserpro
Copy link

Using api.content.find(Title='(test)') we get the error:

ParseError: Token 'EOF' required, u'(' found. This is because we have a limitation in Products.ZCTextIndex with some special chars like ( (check zopefoundation/Products.ZCTextIndex#2).

Plone 5, in default search view, already does something to avoid this error in https://github.com/plone/Products.CMFPlone/blob/5.1b4/Products/CMFPlone/browser/search.py#L28. Wouldn't be the case to something similar in api.content.find?

@jaroel
Copy link
Member

jaroel commented Sep 23, 2017

Here's a workaround:

from Products.CMFPlone.browser.search import quote_chars
api.content.find(Title=quote_chars('(test)')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants