Empty search term in collection object & queryString update

[edit to clarify the problem]

when i create a collection object the Search Term field is empty.

i updated plone.app.querystring to 1.4.14 because this might be the reason for the problem (see GitHub /plone/plone.app.querystring/pull/94). i changed the version in release-5.2.0-versions.cfg

plone.app.querystring                 = 1.4.14

then i ran bin/buildout and restarted Plone.

now, i have two apps

./buildout-cache/eggs/plone.app.querystring-1.4.11-py2.7.egg/plone/app/querystring/queryparser.py
./buildout-cache/eggs/plone.app.querystring-1.4.14-py2.7.egg/plone/app/querystring/queryparser.py

the bug above still exists. i suppose that the old queryString app 1.4.11 is used instead of 1.4.14.

how can i remove plone.app.querystring 1.4.11?

any other suggestions to solve the collection object problem?

thanks!

Check the bin/instance script to be sure which version is being used.

thanks, show all

    '/users/Plone5.2/buildout-cache/eggs/plone.app.querystring-1.4.14-py2.7.egg'

still wondering why i have the problem when using the collection objects

the current state looks like this:

I don't think that version 1.4.14 of plone.app.querystring fixes your problem. I think you can go back to 1.4.11.

I suggest you check the browser console to see if it indicates an error.

the only erro i see

opening https://ABC/@@qsOptions leads to

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 155, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 337, in publish_module
  Module ZPublisher.WSGIPublisher, line 255, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 61, in call_object
  Module plone.app.content.browser.query, line 13, in __call__
  Module plone.app.querystring.registryreader, line 137, in __call__
  Module plone.app.querystring.registryreader, line 109, in mapOperations
TypeError: 'NoneType' object is not iterable

I use Products.PDBDebugMode to analyse situations which led to exceptions. If your Plone runs in development mode, Products.PDBDebugMode enters the debugger when an exception arrives at the ZPublisher (i.e. is not handled as part of application request processing) or when an error or exception is logged.

In your case, it would allow you to learn what was read and was surprisingly wrong.

But maybe, I have an idea what might be wrong. The registry has its data in the ZODB. Therefore, it is not sufficient to update code; in addition, profiles associated with the code need also be reimported to update ZODB maintained configuration values.

We (me and colleagues) had to reimport the profile associated with plone.app.querystring to solve several search related problems. Our error observations have been different than yours - but, maybe, the same fix works nevertheless.

thanks @dieter! can you share details how to do the reimport?

@mwaehlisch has your website been upgraded from an older version of Plone to version 5.2.0? If yes, did you run the upgrade steps?

There might be Plone support (something like "reinstall/upgrade product" in the Plone control panel) - but as plone.app.querystring is part of Plone (and not a custom installed product), this is less likely.

Anyway, I did it directly by GenericSetup means, e.g. via portal_setup (an object in your Plone portal, accessed via the ZMI (= "Zope Management Interface")). Because I had to do it in many portals, I did it in a script: portal.portal_setup.runAllImportStepsFromProfile(""profile-plone.app.querystring:default", ignore_dependencies=True). You should be able to do similar things via the Import (did not work here) or Advanced Import ZMI tabs of portal_setup.

In my case, the portal was upgraded (from 4.x to 5.2.0) and the upgrade steps have been executed -- but nevertheless the registry had not everything required by plone.app.querystring. In my case, the error message indicated missing registry settings.

thanks @dieter! the reimport fixed the problem. open <URL>/portal_setup/manage_importSteps, select title and id as described above, deselect importer that lead to errors, import, done :slight_smile: .

2 Likes