Did anyone run pas.plugins.ldap successfully with plone 6.0.9? OR have any other LDAP solution?

pas.plugins.ldap install succeed,make start-backend failed(install other add-ons is OK).

Traceback (most recent call last):
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/xmlconfig.py", line 393, in endElementNS
self.context.end()
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/config.py", line 701, in end
self.stack.pop().finish()
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/config.py", line 868, in finish
args = toargs(context, *self.argdata)
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/config.py", line 1698, in toargs
args[str(name)] = field.fromUnicode(s)
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/fields.py", line 272, in fromUnicode
v = vt.fromUnicode(s)
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/fields.py", line 174, in fromUnicode
value = self.context.resolve(name)
File "/home/portal/backend/lib/python3.10/site-packages/zope/configuration/config.py", line 223, in resolve
import(mname)
File "/home/portal/backend/lib/python3.10/site-packages/yafowil/plone/autoform/form.py", line 35, in
from yafowil.plone.autoform.factories import widget_factory
File "/home/portal/backend/lib/python3.10/site-packages/yafowil/plone/autoform/factories.py", line 6, in
from plone.app.widgets.utils import get_ajaxselect_options
ImportError: cannot import name 'get_ajaxselect_options' from 'plone.app.widgets.utils' (unknown location)

From my own installation notes:

patch yafowil.plone.resources.py to comment out the 4 data.write lines that reference require.js
see yafowil.plone throws errors in Plone 6, because of requireJS · Issue #41 · bluedynamics/yafowil.plone · GitHub

def get_resources_content(self, resources):
    data = StringIO()
    #data.write('var mockup_require = require;\n')
    #data.write('var mockup_define = define;\n')
    data.write('require = undefined;\n')
    data.write('define = undefined;\n')
    self.read_resources_content(data, resources)
    #data.write('require = mockup_require;\n')
    #data.write('define = mockup_define;\n')

    return data.getvalue()

Edit: this seems to have been fixed here: Fix "ReferenceError: require is not defined" error. by alecghica · Pull Request #45 · bluedynamics/yafowil.plone · GitHub

1 Like

Well, this needs more love/ money/ project/ contributors here.

It works. Here my mx.ini to get it running:

[yafowil.plone]
url = ${settings:github}/bluedynamics/yafowil.plone.git
pushurl = ${settings:github-push}:bluedynamics/yafowil.plone.git
branch = master

[yafowil.bootstrap]
url = ${settings:github}/bluedynamics/yafowil.bootstrap.git
pushurl = ${settings:github-push}:bluedynamics/yafowil.plone.git
branch = 2.0

[pas.plugins.ldap]
url = ${settings:github}/collective/pas.plugins.ldap.git
branch = p6

And in the project I am using it, in contraints.txt I set node.ext.ldap==1.0.
I am not sure if this is required or just a leftover.

4 Likes

I have it running on a (testing) site with this pins: I did not notice any error so far:

# pas.plugins.ldap eggs
bda.cache = 1.3.0
five.globalrequest = 99.1
node = 1.2.1
node.ext.ldap = 1.2
node.ext.ugm = 1.1
odict = 1.9.0
pas.plugins.ldap = 1.8.2
passlib = 1.7.4
plumber = 1.7
pyasn1 = 0.5.0
pyasn1-modules = 0.3.0
python-ldap = 3.4.3
yafowil = 3.1.0
yafowil.bootstrap = 2.0.0a1
yafowil.plone = 5.0.0a1
yafowil.widget.array = 1.7
yafowil.widget.dict = 1.8
yafowil.yaml = 2.0
2 Likes

Use yafowil.plone 5.0.0a1

1 Like

Thank you for your kindly help, but when I run make build-backend, I got this error:

File "/usr/lib/python3.10/configparser.py", line 508, in _interpolate_some
    raise InterpolationMissingOptionError(
configparser.InterpolationMissingOptionError: Bad value substitution: option 'url' in section 'yafowil.plone' contains an interpolation key 'settings:github' which is not a valid option name. Raw value: '${settings:github}/bluedynamics/yafowil.plone.git'
make[1]: *** [Makefile:112: build-dev] Error 1

Thank you so much! It's work!

Got it, thank you!

1 Like