collective / pas.plugins.ldap

Zope (and Plone) PAS Plugin providing users and groups from LDAP directory
http://pypi.python.org/pypi/pas.plugins.ldap
Other
13 stars 20 forks source link

Import loader from YAFOWIL. #98

Closed al45tair closed 4 years ago

al45tair commented 4 years ago

Without doing this, various built-in widgets aren't registered, which results in mysterious KeyError messages when people try to configure LDAP in Plone.

Fixes #97 and #92.

al45tair commented 4 years ago

@reinhardt FWIW, the "magic import" is what the YAFOWIL documentation tells you to do. My guess (I haven't checked) is that what happened that broke it is that someone set things up to check everything with Flake8, which said it wasn't used, so it got deleted. That might not have broken on some peoples' setups because they may be doing that import in some other module, so YAFOWIL ends up with everything registered properly because it's already pulled in elsewhere.

I'm not a huge fan of the magic import either, but IMO that's really something that would need addressing in YAFOWIL rather than here.

reinhardt commented 4 years ago

I'm not a huge fan of the magic import either, but IMO that's really something that would need addressing in YAFOWIL rather than here.

I agree. If @jensens has no further reservations I would merge it like this.

rnixx commented 4 years ago

the import of yafowil.loader actually registers all blueprints of yafowil and addon widgets to the yafowil factory. Maybe we change this in future and provide a dedicated function call to avoid confusion. Though, as this would be an API break, it probably will not happen very soon.

rnixx commented 4 years ago

someone should drop a release. @jensens?

reinhardt commented 4 years ago

I can do that. I'll make it 1.7.2.

reinhardt commented 4 years ago

... except that my release setup seems to be broken in some way. I'd be grateful if someone else could take care of it after all.

reinhardt commented 4 years ago

Ah! Now it worked. Strange. But that should be all done now.

NicolasGoeddel commented 4 years ago

I just installed pas.plugins.ldap on Plone 5.2.1 (5208) and I also got the KeyError: 'form' thing here. Buildout tells me that it has installed version 1.7.2. After reading this issue I thought this would be enough to solve the error. But it seeems not. How can I fix the issue then? Also the Plone extension manager tells me that pas.plugins.ldap should not be uninstalled. How to upgrade then? I am just curious.

cekk commented 4 years ago

same problem here: fresh install of pas.plugins.ldap (1.7.2) and i have the same error of @NicolasGoeddel