Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plone 5 compatibility #24

Open
jkubaile opened this issue Jun 11, 2015 · 6 comments
Open

Plone 5 compatibility #24

jkubaile opened this issue Jun 11, 2015 · 6 comments

Comments

@jkubaile
Copy link

Hi,

i am trying to use plone.app.ldap in a Plone 5 environment. Installation via buildout was fine. Quick Installing in Plone works also. But using the control panel view and adding a new server or a new schema leads in the following error:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module Products.PDBDebugMode.runcall, line 71, in pdb_runcall
  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 plone.app.form._named, line 42, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 93, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 257, in render
  Module chameleon.template, line 190, in render
  Module chameleon.template, line 172, in render
  Module 8a51f2b01b43baec52fa6a94857d1613d392a885.py, line 123, in render
  Module five.pt.expressions, line 154, in __call__
  Module five.pt.expressions, line 126, in traverse
  Module zope.traversing.adapters, line 136, in traversePathElement
   - __traceback_info__: (<Products.Five.metaclass.PropertyAdding object at 0x7fbae510aa90>, 'main_template')
  Module zope.traversing.adapters, line 50, in traverse
   - __traceback_info__: (<Products.Five.metaclass.PropertyAdding object at 0x7fbae510aa90>, 'main_template', ('macros', 'master'))
LocationError: (<Products.Five.metaclass.PropertyAdding object at 0x7fbae510aa90>, 'main_template')

 - Expression: "context/main_template/macros/master"
 - Filename:   ... pp.form-2.3.2-py2.7.egg/plone/app/form/addingpageform.pt
 - Location:   (5:23)
 - Source:     ... etal:use-macro="context/main_template/macros/master">
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x7fbae6ed6b10>
               views: <ViewMapper - at 0x7fbae499d090>
               modules: <instance - at 0x7fbaef769a70>
               args: <tuple - at 0x7fbafa641050>
               here: <ImplicitAcquisitionWrapper +ldapschema at 0x7fbae70d1e10>
               user: <ImplicitAcquisitionWrapper - at 0x7fbae70e2780>
               nothing: <NoneType - at 0x7b1070>
               container: <ImplicitAcquisitionWrapper +ldapschema at 0x7fbae70d1e10>
               request: <instance - at 0x7fbae6f00998>
               wrapped_repeat: <SafeMapping - at 0x7fbae4b65628>
               traverse_subpath: <list - at 0x7fbae3564560>
               default: <object - at 0x7fbafa617bc0>
               loop: {...} (0)
               context: <ImplicitAcquisitionWrapper +ldapschema at 0x7fbae70d1e10>
               view: <PropertyAddForm plone.LdapProperty at 0x7fbae510aad0>
               translate: <function translate at 0x7fbae4bc9410>
               root: <ImplicitAcquisitionWrapper Zope at 0x7fbae71bcf00>
               options: {...} (0)
               target_language: <NoneType - at 0x7b1070>

I would suggest, that it has something todo with the formlib based forms, which are used here. It was possible to set servers and schemas via the debugger. Than the access to the users and authentication seems to work also...

@reinhardt
Copy link

+1

@jaroel
Copy link
Member

jaroel commented Feb 24, 2018

Here's a minimal Plone 5.1 buildout that makes this all work.
We need the BBB import to exclude some CMFDefault bits, the p.a.form overrides, and we need to mark the views as ITraversable so we use (un)restrictedTraverse to get to the main_template.

[buildout]
parts = instance
extends =
    http://dist.plone.org/release/5.1rc2/versions.cfg
versions = versions

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
    Plone
    plone.app.ldap
    plone.app.form
zcml =
	Products.CMFPlone:meta-bbb.zcml
	plone.app.form
zcml-additional =
	<include package="plone.app.form" file="overrides.zcml" />
	<class class="plone.app.ldap.browser.baseform.Adding">
      	  <implements interface="OFS.interfaces.ITraversable" />
        </class>

@tkimnguyen
Copy link
Member

tkimnguyen commented Feb 13, 2019

I gave this minimal buildout a shot with Plone 5.1.5 but am getting these errors. It looks like it's trying to grab plone.app.ldap 1.4.3.

Installing client1.
Getting distribution for 'plone.app.form'.
warning: no previously-included files matching '*pyc' found anywhere in distribution
Got plone.app.form 2.3.2.
Version and requirements information containing zope.formlib:
  [versions] constraint on zope.formlib: 4.0.6
  Requirement of plone.app.form: zope.formlib>=4.0
  Requirement of webcouturier.dropdownmenu==3.0.2: zope.formlib
  Requirement of zope.formlib>=4.0: zope.datetime
  Requirement of zope.formlib>=4.0: zope.traversing
  Requirement of zope.formlib>=4.0: zope.security
  Requirement of zope.formlib>=4.0: zope.schema>=3.5.1
  Requirement of zope.formlib>=4.0: zope.publisher
  Requirement of zope.formlib>=4.0: zope.lifecycleevent
  Requirement of zope.formlib>=4.0: zope.interface
  Requirement of zope.formlib>=4.0: zope.i18nmessageid
  Requirement of zope.formlib>=4.0: zope.i18n
  Requirement of zope.formlib>=4.0: zope.event
  Requirement of zope.formlib>=4.0: zope.component
  Requirement of zope.formlib>=4.0: zope.browserpage>=3.11.0
  Requirement of zope.formlib>=4.0: zope.browser>=1.1
  Requirement of zope.formlib>=4.0: pytz
  Requirement of zope.formlib>=4.0: setuptools
  Requirement of five.formlib: zope.formlib>=4.4
  Requirement of five.formlib>=1.0.2: zope.formlib>=4.4
While:
  Installing client1.
Error: The requirement ('zope.formlib>=4.4') is not allowed by your [versions] constraint (4.0.6)

@almeidajeff
Copy link

Hi @tkimnguyen , I'm going through this same problem in Plone version 5.1.

Any palliative solution?

@tkimnguyen
Copy link
Member

I haven't revisited this, and unfortunately I'm not recalling what I did to get around or over this (or if I just gave up).

@almeidajeff
Copy link

I ended up giving up too and ended up using pas.plugins.ldap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants