plone/plone.app.ldap — Issue #1: TypeError: argument of type 'NoneType' is not iterable error at @@ldap-controlpanel ater clicking Save
Author: akorvenr
Created: 2011-11-25 11:11:36+00:00
State: open

Any attempt of save configuration, add server, etc. ends up with TypeError after clicking Save. I have tested with different buildouts and UnifiedInstaller. In all cases installation is fresh and have created new Plone site with plone.app.ldap addon installed.

2011-11-25 12:48:01 CRITICAL event.LDAPDelegate No servers defined
2011-11-25 12:48:01 ERROR Zope.SiteErrorLog 1322218081.060.0726167258739 http://localhost:8080/Plone/+ldapserver/plone.LdapServer
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module zope.formlib.form, line 795, in __call__
Module five.formlib.formbase, line 50, in update
Module zope.formlib.form, line 776, in update
Module zope.formlib.form, line 620, in success
Module plone.app.ldap.browser.baseform, line 64, in handle_save_action
Module zope.formlib.form, line 901, in createAndAdd
Module plone.app.ldap.browser.server, line 53, in create
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module plone.app.ldap.ploneldap.server, line 21, in HandleCreated
Module plone.app.ldap.ploneldap.util, line 42, in guaranteePluginExists
Module plone.app.ldap.ploneldap.util, line 86, in createLDAPPlugin
Module plone.app.ldap.ploneldap.util, line 173, in enablePASInterfaces
TypeError: argument of type 'NoneType' is not iterable
2011-11-25 12:48:01 CRITICAL event.LDAPDelegate No servers defined

Tested with:
Plone-4.1.2-UnifiedInstaller and buildout with http://dist.plone.org/release/4.1.2/versions.cfg

Versions:
Plone == 4.1.2
plone.app.ldap == 1.2.7
python_ldap == 2.4.4

I solved the problem with:

--- plone/app/ldap/engine/storage.py~
+++ plone/app/ldap/engine/storage.py
@@ -30,7 +30,7 @@
default_user_roles = ""
read_only = False
activated_interfaces = []
- activated_plugins = None
+ activated_plugins = []
cache = ''