While developing a Portet wich makes use of a choice field in its settings I got an infinite recursion error.
As I've noticed the error also occurs in Plone standart portlets, for example Navigation Portlet.
I seems the error does not occur in Plone versions priror to 3.2.1.
I would be glad if someone could tell me if that's a known bug.
I couldn't find it on the bugtrack.
Below you can read how to reproduce the error and my testing results on differnt Plone versions.
Goto "Manage portlets"
Choose "Navigation"
You get the portlets settings page : "Edit Navigation Portlet"
Goto to this section:
"Root node" ("You may search for and choose a folder to act as the root ...")
- Enter the text edit field. (by clicking on it)
- Leave the field. (by clicking somewhere on the page background or on a different field)
Now a formlib KSS inline validation is invoced and it fails each time.
Request:
http://192.168.2.232:8080/Plone/++contextportlets++plone.leftcolumn/navigation/kss_formlib_inline_validation?kukitTimeStamp=1246629132755&fieldname=form.root&form.bottomLevel=0&form.currentFolderOnly.used=&form.includeTop.used=&form.name=&form.root.displayed=y&form.root.query=&form.topLevel=1&formname=edit&referer=http%3A%2F%2F192.168.2.232%3A8080%2FPlone%2F%40%40manage-portlets&value=(gets a 500 - Internal Server Error)
A trace can be found on the console when running in foreground mode or in zinstance\var\log\instance.log
It looks like this:
2009-07-03T15:52:11 ERROR Zope.SiteErrorLog
http://192.168.2.232:8080/Plone/++contextportlets++plone.leftcolumn/navigation/kss_formlib_inline_validation/validate_inputTraceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module <wrapper>, line 5, in wrapper
Module kss.core.actionwrapper, line 238, in apply
Module plone.app.form.kss.validation, line 37, in validate_input
Module zope.formlib.form, line 257, in setUpWidgets
Module zope.schema._field, line 239, in bind
Module plone.app.vocabularies.catalog, line 233, in __call__
Module plone.app.vocabularies.catalog, line 147, in __init__
Module Products.CMFCore.utils, line 101, in getToolByName
Module zope.component._api, line 204, in getUtility
Module zope.component._api, line 210, in queryUtility
Module zope.component.registry, line 132, in queryUtility
Module five.localsitemanager.registry, line 39, in _uncached_lookup
Module five.localsitemanager.registry, line 129, in _wrap
Module five.localsitemanager.registry, line 94, in _recurse_to_site
Module five.localsitemanager.registry, line 94, in _recurse_to_site
[...] this line repeats about 180 times.
RuntimeError: maximum recursion depth exceeded in cmp
---
It looks like an aquisition problem to me.
Testing results on different versions
OK, no Error:
* Plone 3.1.7
* CMF 2.1.1
* Zope (Zope 2.10.6-final, python 2.4.5, linux2)
* Python 2.4.5 (#1, Jul 3 2009, 15:31:03) [GCC 4.2.4]
* PIL 1.1.6
Error occurs:
Plone-3.2.1r4-UnifiedInstaller.tgz
* Plone 3.2.1
* CMF 2.1.2
* Zope (Zope 2.10.7-final, python 2.4.5, linux2)
* Python 2.4.5 (#1, Jul 3 2009, 14:52:38) [GCC 4.2.4]
* PIL 1.1.6
Error occurs:
Plone-3.2.2-UnifiedInstaller.tgz
* Plone 3.2.2
* CMF 2.1.2
* Zope (Zope 2.10.7-final, python 2.4.5, linux2)
* Python 2.4.5 (#1, Jul 3 2009, 14:56:39) [GCC 4.2.4]
* PIL 1.1.6
Error occurs:
Plone-3.2.3-UnifiedInstaller.tgz
* Plone 3.2.3
* CMF 2.1.2
* Zope (Zope 2.10.7-final, python 2.4.5, linux2)
* Python 2.4.5 (#1, Jul 3 2009, 15:02:18) [GCC 4.2.4]
* PIL 1.1.6
Many thanks for any hints,
Martin