plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
246 stars 187 forks source link

@@personal-information broken when plone.app.multilingual is installed #2116

Closed pbauer closed 6 years ago

pbauer commented 7 years ago

What I did:

Install plone.app.multilingual. Click on Username > Preferences > Personal Information Repoduce easily here: http://demo.plone.de/en/@@personal-information Called on the site_root it works: http://demo.plone.de/@@personal-information

What I expect to happen:

The view should be rendered

What actually happened:

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 plone.app.users.browser.userdatapanel, line 95, in __call__
  Module z3c.form.form, line 233, in __call__
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 132, in update
  Module z3c.form.form, line 136, in updateWidgets
  Module z3c.form.field, line 243, in update
  Module z3c.form.datamanager, line 102, in canWrite
  Module z3c.form.datamanager, line 66, in adapted_context
TypeError: ('Could not adapt', <Container at /Plone/en>, <SchemaClass plone.supermodel.model.member-fields>)

What version of Plone/ Addons I am using:

Plone 5.1 coredev and Plone 5.0.8

ebrehault commented 7 years ago

probably related to https://github.com/plone/Products.CMFPlone/issues/2083

pbauer commented 7 years ago

This is not related to #2083

pbauer commented 6 years ago

This really needs a fix and a regression-test.

jensens commented 6 years ago

I dug a bit into it. I have no clue why the schemaeditor created schema cannot adapt its context.

Wild guess is because p.a.multilingual also fiddles with the schemaeditor (it has also an own ISchemaContext provider) and so both together might not work well.

Easy solution would be to just change the users actions context to use the plone site root and not the navigation root.

IMO this has no effect on the functionality.

jensens commented 6 years ago

well, no, then this does not work for sites where nav root is set to a domain directly. So we need a solution. But I am not deep enough into the schemaeditor story to fix it.

pbauer commented 6 years ago

True. Maybe @ebrehault could have another look at this since he wrote the memberdata feature. I just confirmed that this is broken in Plone 5.0.8 as well.

pbauer commented 6 years ago

The same is true for 5.0