plone / plone.app.querystring

Provides an queryparser, querybuilder and extra helper tools, to parse stored queries to actual results, used in new style Plone collections
https://pypi.org/project/plone.app.querystring/
2 stars 26 forks source link

KeyError for list operation after upgrade #69

Open mauritsvanrees opened 7 years ago

mauritsvanrees commented 7 years ago

Today I tested an upgrade from Plone 3.1 to 4.3 and then on to 5.0.6. When I edit a page and want to search for an image, I get a traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.app.content.browser.vocabulary, line 101, in __call__
  Module plone.app.content.browser.vocabulary, line 323, in get_vocabulary
  Module plone.app.vocabularies.catalog, line 594, in __call__
  Module plone.app.vocabularies.utils, line 7, in parseQueryString
  Module plone.app.querystring.queryparser, line 29, in parseFormquery
  Module plone.registry.registry, line 38, in __getitem__
KeyError: u'plone.app.querystring.operation.list.contains.operation'

Looking in the configuration registry, I see lots of things starting with plone.app.querystring.operation, but nothing starting with plone.app.querystring.operation.list.

Going to portal_setup and applying the plone.app.querystring:default profile, fixes it. But it should work out of the box after an upgrade. I don't know where this exactly goes wrong. There were no unapplied upgrade steps.

davisagli commented 7 years ago

So maybe someone made a change to the plone.app.querystring profile but neglected to add an upgrade step to make the same change for existing sites?

mauritsvanrees commented 7 years ago

This part of registry.xml in current master is the exact same as in plone.app.upgrade for version 4.2 rc1. It has not changed since then. Weird. It is already broken when upgrading from Plone 3.1 to 4.3.

NicolasGoeddel commented 6 years ago

How do I apply the profile plone.app.querystring:default? in portal_setup. I've got the same problem when I try to delete a folder in a Plone 5 instance. The Delete button itself makes the error. I am not able to click on it while in folder_contents.

mauritsvanrees commented 6 years ago

I don't think the Delete button has anything to do with plone.app.querystring, so this may be a different error. I could be wrong.

But to apply it: