Can't get Plone5 + plone.app.ldap to work without failures

Hi.

Ummm - we were having another discussion in this thread:

But apparently I'm too new and I'm not allowed to post there anymore?

So - I did as suggested in the thread and back-rev'ed my version of plone.app.ldap to 1.3.2 and when I try to actually use the application in the control panel, I get a traceback and failure:

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 zope.formlib.form, line 800, in __call__
  Module zope.formlib.form, line 920, in render
  Module zope.formlib.form, line 790, in render
  Module zope.browserpage.namedtemplate, line 60, in __get__
  Module zope.component._api, line 96, in getAdapter
ComponentLookupError: (<Products.Five.metaclass.PropertyAddForm object at 0xa761190>, <InterfaceClass zope.browserpage.namedtemplate.INamedTemplate>, 'default')

Thank you, and I am sorry I had to start a new thread. I was trying to keep it self contained and not make a mess of the forum board.

Thank you for your time.

-z

Your earlier buildout.cfg really looks vanilla.

I don't have any other suggestions other than to maybe search through the issues in Github for plone.app.ldap to see if anyone else has had the same trouble. Could be a change in Plone 5.0.4 (I got bit by a small change going from 5.0.2 the other day). Consider filing your problem as an issue in that repo.

Without trying it myself I don't know what else to suggest. I'll be traveling tomorrow and then will be sprinting otherwise I'd give it a shot myself.

I don't think that buildout looked vanilla, it had outcommented the Known Good Set.
Please un-uncomment the line
# http://dist.plone.org/release/5.0.4/versions.cfg
and remove ldap and make sure Plone vanilla is actually building and starting properly.

Without those version pins your buildout is a moving target that changes every time somebody pops a new package on pypi.

1 Like

Guido, I think that line is commented out because the local versions.cfg is a copy of the one at that URL.

But you're right, @zebra should ensure that without plone.app.ldap his buildout succeeds and Plone runs without error first.

@zebra what exactly are you clicking on or doing that causes the error?

Hi guys.

Yep - plone builds out fine and runs perfectly without all those additions. It seems to run perfectly with all the additional modules in the build out UNTIL I click a button to add an attribute to the schema in the LDAP control panel or add/modify the LDAP/save the LDAP config.

At the bottom of the LDAP control panel there is a button called "add property". Clicking that causes the error. Equally, when I click the add LDAP server button it ALSO craters, like so:

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 zope.formlib.form, line 800, in __call__
Module zope.formlib.form, line 920, in render
Module zope.formlib.form, line 790, in render
Module zope.browserpage.namedtemplate, line 60, in __get__
Module zope.component._api, line 96, in getAdapter
ComponentLookupError: (<Products.Five.metaclass.ServerAddForm object at 0xa86bf90>, <InterfaceClass zope.browserpage.namedtemplate.INamedTemplate>, 'default')

i have the same problem with the same error ,please have you found a solution?

Which version of Plone and plone.app.ldap? Maybe try pas.plugins.ldap?

Same issue here. Steps to reproduce:

  • install Plone v5.0.6 or v5..07 per Plone instructions
  • edit buildout.cfg to include these eggs
    plone.app.ldap
    plone.app.form
  • rebuild using, sudo -u plone_buildout bin/buildout
  • start plone in the foreground for testing, bin/plonectl fg

Logon to web interface, enter Site config, install LDAP add-in, enter LDAP configuration, click the button to add a LDAP Server

Error appears on console and in web interface:
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 zope.formlib.form, line 800, in call
Module zope.formlib.form, line 920, in render
Module zope.formlib.form, line 790, in render
Module zope.browserpage.namedtemplate, line 60, in get
Module zope.component._api, line 96, in getAdapter
ComponentLookupError: (<Products.Five.metaclass.PropertyAddForm object at 0x7ff97ddfdbd0>, , 'default')


This error is reproducible if you pin plone.app.ldap back to v1.3.2 as well.
The issue is not the ldap plugin but the forms plugin, from what I can see.

bump!

April 25th, and it appears that this is still a problem. Using Plone 5.0.7, trying to get plone.app.ldap to work and getting:


ceback (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 zope.formlib.form, line 800, in call
Module zope.formlib.form, line 920, in render
Module zope.formlib.form, line 790, in render
Module zope.browserpage.namedtemplate, line 60, in get
Module zope.component._api, line 96, in getAdapter
ComponentLookupError: (<Products.Five.metaclass.ServerAddForm object at 0x7fad01adcbd0>, , 'default')

Removing the eggs and redoing buildout allows me to get back to my "vanilla" 5.0.7 install.

For Plone 5, the consensus is that plone.app.ldap has been replaced by pas.plugins.ldap. Please try the latter.

If that's the consensus, their README's should state that clearly :slight_smile:

@gforcada I created this PR but it is failing https://github.com/plone/plone.app.ldap/pull/32