Pas.plugins.ldap does not work with Plone 5.2.1 fresh install

Hi,

I just installed a fresh plone 5.2.1 site, with the pas.plugins.ldap and collective.easyform addons (using python3) .

Clicking on the LDAP control panel in site settings, or the pasldap option via the ZMI > acl_users folder just generates an error.

I've added a comment to the open bug for this at:

https://github.com/collective/pas.plugins.ldap/issues/92

Wondering if anyone has managed to get 5.2.1 working with pas.plugins.ldap?

Cheers,

Lee.

Yes, I have two sites running 5.2.1, pas.plugins.ldap, and collective.easyform. (The only other add-ons in use are plone.app.mosaic and the Products.PloneHotfix20200121.) The sites are likewise also using Python 3.

I'm not sure I'll be much help other than datapointing, since I didn't do anything to make it work -- it just did, out of the box.

I would help if you tell us more about the error, like pasting it as preformatted text in here.

Hi,

This is a freshly installed plone 5.2.1 (Installed with python3) and p.p.l 1.7.0 (only other addon is collective.easyforms).

This install runs on a fully patched CentOS 7.7 VM.

Clicking on the plone_ldapcontrolpanel generates the following error:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 338, in publish_module
  Module ZPublisher.WSGIPublisher, line 256, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 62, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 61, in __call__
  Module zope.pagetemplate.pagetemplate, line 135, in pt_render
  Module Products.PageTemplates.engine, line 88, in __call__
  Module z3c.pt.pagetemplate, line 173, in render
  Module chameleon.zpt.template, line 306, in render
  Module chameleon.template, line 209, in render
  Module chameleon.utils, line 75, in raise_with_traceback
  Module chameleon.template, line 187, in render
  Module 69cc91f407ac8bd99b31e3dfc739de96.py, line 356, in render
  Module 7ad64bdfe577578d280d0a93bebdb894.py, line 286, in render_master
  Module ccd496539b69f40c9d593235ac933d1c.py, line 687, in render_master
  Module 7ad64bdfe577578d280d0a93bebdb894.py, line 266, in __fill_content
  Module ccd496539b69f40c9d593235ac933d1c.py, line 1273, in render_content
  Module 7ad64bdfe577578d280d0a93bebdb894.py, line 257, in __fill_main
  Module 69cc91f407ac8bd99b31e3dfc739de96.py, line 335, in __fill_prefs_configlet_main
  Module pas.plugins.ldap.properties, line 85, in form
  Module yafowil.yaml.parser, line 23, in parse_from_YAML
  Module yafowil.yaml.parser, line 59, in __call__
  Module yafowil.yaml.parser, line 147, in create_tree
  Module yafowil.yaml.parser, line 145, in create_children
  Module yafowil.yaml.parser, line 144, in create_children
  Module yafowil.yaml.parser, line 122, in call_factory
  Module yafowil.base, line 706, in __call__
  Module yafowil.widget.array.widget, line 72, in array_builder
  Module yafowil.base, line 684, in __call__
KeyError: 'table'

 - Expression: "provider:plone.abovecontent"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 67: col 59)
 - Source:     ...
                                       ^
 - Expression: "context/@@main_template/macros/master"
 - Filename:   ... oducts/CMFPlone/skins/plone_prefs/prefs_main_template.pt
 - Location:   (line 2: col 30)
 - Source:     ... tal:use-macro="context/@@main_template/macros/master">
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "context/prefs_main_template/macros/master"
 - Filename:   ... 6.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt
 - Location:   (line 6: col 23)
 - Source:     ... l:use-macro="context/prefs_main_template/macros/master"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <ViewPageTemplateFile - at 0x7f56cfd1d828>
               options: {...} (0)
               args: <tuple - at 0x7f56ed19f048>
               nothing: <NoneType - at 0x88e860>
               modules: <_SecureModuleImporter - at 0x7f56dac24438>
               request: <WSGIRequest - at 0x7f56cd2e4208>
               view: <SimpleViewClass from /home/web/internal-plone5/buildout-cache/eggs/pas.plugins.ldap-1.7.0-py3.6.egg/pas/plugins/ldap/plonecontrolpanel/controlpanel.pt plone_ldapcontrolpanel at 0x7f56cd3d6048>
               context: <ImplicitAcquisitionWrapper Intranet at 0x7f56d2c81090>
               views: <ViewMapper - at 0x7f56cd3d6780>
               here: <ImplicitAcquisitionWrapper Intranet at 0x7f56d2c81090>
               container: <ImplicitAcquisitionWrapper Intranet at 0x7f56d2c81090>
               root: <ImplicitAcquisitionWrapper  at 0x7f56d0491048>
               traverse_subpath: <list - at 0x7f56cd6911c8>
               user: <ImplicitAcquisitionWrapper - at 0x7f56d2b5a750>
               default: <object - at 0x7f56ed19aaa0>
               repeat: {...} (0)
               loop: {...} (0)
               wrapped_repeat: <SafeMapping - at 0x7f56d12c3388>
               target_language: <NoneType - at 0x88e860>
               translate: <function translate at 0x7f56cd35e620>
               macroname: master
2020-02-01 20:03:35,647 INFO    [yafowil.plone:50][waitress] Activate resource 'plone5/widget.css' for group 'yafowil.widget.dict.common' order: '20'
2020-02-01 20:03:35,647 INFO    [yafowil.plone:50][waitress] Activate resource 'plone5/widget.css' for group 'yafowil.widget.array.common' order: '20'
2020-02-01 20:03:35,647 INFO    [yafowil.plone:50][waitress] Activate resource 'yafowil-fontello.css' for group 'yafowil.plone.common' order: '10'
2020-02-01 20:03:35,647 WARNING [yafowil.plone:34][waitress] Skipping resource 'jqueryui/jquery-ui-1.10.3.custom.css' for group 'yafowil.plone.jqueryui'
2020-02-01 20:03:35,659 INFO    [yafowil.plone:50][waitress] Activate resource 'widget.js' for group 'yafowil.widget.dict.common' order: '20'
2020-02-01 20:03:35,659 INFO    [yafowil.plone:50][waitress] Activate resource 'widget.js' for group 'yafowil.widget.array.common' order: '20'
2020-02-01 20:03:35,660 WARNING [yafowil.plone:34][waitress] Skipping resource 'jquery.migrate-1.2.1.min.js' for group 'yafowil.plone.jqueryui'
2020-02-01 20:03:35,660 WARNING [yafowil.plone:34][waitress] Skipping resource 'jqueryui/jquery-ui-1.10.3.custom.min.js' for group 'yafowil.plone.jqueryui

I'm using p.p.l 1.7.0 on Plone 5.2.2 and didn't experience this particular issue. I am not using easyForm on this site. No mosaic installed on this machine either. I have just an add-on my colleague has developed for faculty workload. I'm running Python 3.7.6 on Ubuntu 18.0.4 LTS.

The following part definition lists the versions picked:
[versions]
SQLAlchemy = 1.3.13
node.ext.ldap = 1.0b11
node.ext.ugm = 0.9.10
plumber = 1.5
pyasn1 = 0.4.8
pyasn1-modules = 0.2.8
pyodbc = 4.0.27
python-ldap = 3.2.0
yafowil = 2.3.2
yafowil.plone = 3.0.0
z3c.sqlalchemy = 1.4.0
zope.sqlalchemy = 0.7.7

# Required by:
# yafowil.yaml==1.3
PyYAML = 5.3

# Required by:
# node.ext.ldap==1.0b11
argparse = 1.4.0

# Required by:
# node.ext.ldap==1.0b11
# pas.plugins.ldap==1.7.0
bda.cache = 1.3.0

# Required by:
# pas.plugins.ldap==1.7.0
node = 0.9.24
# Required by:
# pas.plugins.ldap==1.7.0
odict = 1.7.0

# Required by:
# node.ext.ldap==1.0b11
passlib = 1.7.2

# Required by:
# bda.cache==1.3.0
python-memcached = 1.59

# Required by:
# pas.plugins.ldap==1.7.0
yafowil.widget.array = 1.6.1

# Required by:
# pas.plugins.ldap==1.7.0
yafowil.widget.dict = 1.7

# Required by:
# pas.plugins.ldap==1.7.0
yafowil.yaml = 1.3

Thanks to everyone that responded to this. I've pinned my versions to match those in your example, ran buildout again and this seems to work now.

Thanks again!

1 Like

FYI, I checked out v1.7.2 and the KeyError on table has been fixed. pypi/repo has info on the changes. Now if I could only understand how/why my AD is configured i might be able to get some actual work done. :roll_eyes:

1 Like

I've got an issue where I want AD users to be default members so they can log in to the site.

I checked out PR81 which is to make LDAP users default members but is there a step/import/setting I'm missing to get this to work? users I query are still showing member unchecked.

Plone Foundation Code of Conduct