Plone.app.querystring version on Plone 4.3

Hi folks,

I'm working on a Plone 4.3.7 site on which I've upgraded plone.app.querystring to 1.3.8 (it's normally 1.2.7 in that version of Plone). After a long while, we've noticed that some collections error when we try to edit them -

My question is: should I try to rollback plone.app.querystring, or try to make things work on that version? There are rather obvious (now I see them) warnings on that product's readme against advancing the version too far!

We've got a lot of (1000+) Topics and ~ 60 (non dx) Collections on the site, but I've only seen the issue with a few Collections so far.

Thanks for any advice / gut feelings!
D

Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 583, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate

  • URL: file:/usr/local/plone-4.3/buildout-cache/eggs/archetypes.querywidget-1.1.1-py2.7.egg/archetypes/querywidget/skins/querywidget/querywidget.pt
  • Line 35, Column 28
  • Expression: <PythonExpr indexes[row['i']]['operators'][row['o']]['widget']>
  • Names:
    {'container': <Collection at //news/aggregator>,
    'context': <Collection at //news/aggregator>,
    'default': <object object at 0x7fd4a31cf560>,
    'here': <Collection at //news/aggregator>,
    'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x7fd48a766490>,
    u'fieldset': <Products.PageTemplates.Expressions.PathIterator object at 0x7fd48a766110>,
    u'row': <Products.PageTemplates.Expressions.PathIterator object at 0x7fd489a06990>},
    'nothing': None,
    'options': {'args': (),
    'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x7fd4881c5e10>},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7fd489d99730>,
    'request': <HTTPRequest, URL=http://site.com/news/aggregator/atct_edit>,
    'root': ,
    'template': <FSControllerPageTemplate at //news/aggregator/atct_edit>,
    'traverse_subpath': [],
    'user': <PloneUser 'useruser'>}
    Module Products.PageTemplates.ZRPythonExpr, line 48, in call
  • traceback_info: indexes[row['i']]['operators'][row['o']]['widget']
    Module PythonExpr, line 1, in
    Module AccessControl.ZopeGuards, line 83, in guarded_getitem
    KeyError: 'plone.app.querystring.operation.selection.is'

@djowett:

There have been some subtle changes in the keys for the IQueryFieldOperations between Plone 4.3 and Plone 5. One of them might be 'plone.app.querystring.operation.selection.is', allthough in code they do the same. Look in the registry.xml of plone.app.querystring where they are registered, the operations themselves are in queryParser.py . You could try to add the missing keys and map them to the right function.

Fred!

thanks for getting me on the right track. In the end it was down to a missing upgrade of Subject index. https://github.com/plone/plone.app.querystring/pull/53 Which is in 1.3.12, so I needed to roll forward not back!

Best,
Daniel

In case it helps anyone, when I reproduced the error locally with PDB available, all I needed to do to find out the index causing the problem was:

(Pdb) up
(Pdb) row
{'i': 'Subject', 'v': ['News'], 'o': 'plone.app.querystring.operation.selection.is'}