collective / collective/collective.searchandreplace
ParseError when searching for a space
- Dominant language
- Python
- Stars
- 5
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
When the user searches for a space, an error occurs.
Version tested: 8.2.2 and the z3cform branch.
It looks like it might be related to https://github.com/collective/collective.searchandreplace/issues/43
The traceback:
```
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 390, in publish_module
Module ZPublisher.WSGIPublisher, line 285, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module z3c.form.form, line 233, in __call__
Module plone.z3cform.fieldsets.extensible, line 62, in update
Module plone.z3cform.patch, line 31, in GroupForm_update
Module z3c.form.group, line 132, in update
Module z3c.form.form, line 136, in updateWidgets
Module z3c.form.contentprovider, line 65, in update
Module collective.searchandreplace.browser.searchreplacetable, line 31, in update
Module collective.searchandreplace.browser.searchreplacetable, line 55, in findObjects
Module collective.searchandreplace.searchreplaceutility, line 194, in findObjects
Module Products.CMFPlone.CatalogTool, line 429, in searchResults
Module Products.ZCatalog.ZCatalog, line 615, in searchResults
Module Products.ZCatalog.Catalog, line 1084, in searchResults
Module Products.ZCatalog.Catalog, line 627, in search
Module Products.ZCatalog.Catalog, line 557, in _search_index
Module Products.ZCTextIndex.ZCTextIndex, line 201, in query_index
Module Products.ZCTextIndex.QueryParser, line 155, in parseQuery
Products.ZCTextIndex.ParseTree.ParseError: Query contains only common words: '* *'
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the search-for-a-space failure on the reported versions, then start in collective/searchandreplace/browser/searchreplacetable.py and collective/searchandreplace/searchreplaceutility.py at the findObjects paths shown in the traceback. Trace how the space becomes the '* *' query and verify that searching for a space completes without Products.ZCTextIndex.ParseTree.ParseError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100