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

Users lookup broken #66

Closed
thet opened this issue May 4, 2016 · 10 comments
Closed

Users lookup broken #66

thet opened this issue May 4, 2016 · 10 comments

Comments

@thet
Copy link
Member

thet commented May 4, 2016

with bda.plone.shop (and bda.plone.productshop) on Plone 4.3, the user lookup is broken. Instead of the username something like this is displayed: <object object at 0x7fd704e09580>

Example for documentByLine:

screen shot 2016-05-04 at 11 39 03

@thet thet added the bug label May 4, 2016
@agitator
Copy link
Member

agitator commented May 4, 2016

imho that's an issue in Plone 5 too

@rnixx
Copy link
Member

rnixx commented May 4, 2016

This bug went in somewhen in p4.x, yes.

@rnixx
Copy link
Member

rnixx commented May 4, 2016

This is probably a good place to start

https://github.com/bluedynamics/bda.plone.shop/blob/master/src/bda/plone/shop/user/configure.zcml

at the time the users stuff went into the shop there was heavy progress on plone.app.users, so chances are hight the something has been optimized until broken or so

@jochumdev
Copy link
Contributor

jochumdev commented May 11, 2016

I have been looking into this.

Debug

While debugging this i found that we use two different _marker in PlonePAS.tools.memberdata.MemberDataTool and Products.CMFCore.MemberDataTool.MemberData, the value we see is the _marker from PlonePAS this is a bug.

When you change the _marker to be imported from CMFCore you get an error "no such property fullname", this is because we delete that property in portal_memberdata over memberdata_properties.xml.

When you manualy readd this property over the CMI you get another error then no such property location, we also delete location from portal_memberdata, so i added that property too and it works.

The fields don't get displayed in @@personal-information.

Possible Solution

  • Register our own Properties Plugin for PlonePAS so MemberDataTool.getProperty returns the computed versions of fullname and location as in UserDataSchemaAdapter.
  • Additional: Fix the bug in PlonePAS.

@jochumdev
Copy link
Contributor

I just found http://docs.plone.org/4/en/old-reference-manuals/pluggable_authentication_service/properties-plugins.html looks like we need to implement that, will update the comment above.

@thet
Copy link
Member Author

thet commented May 12, 2016

The PlonePAS bug should be fixed first.

The customization of userdata properties was done like in https://github.com/collective/collective.examples.userdata

If we need a custom properties plugin, then ok. The implementation looks quite easy. It sounds just not very extensible - it may conflict with other addons, if they provide their own userdata property adapters. But that's maybe negligible.

So, go ahead! :)

@jochumdev
Copy link
Contributor

PlonePAS pr is here

jochumdev added a commit that referenced this issue May 13, 2016
Signed-off-by: Rene Jochum <rene@jochums.at>
jochumdev added a commit that referenced this issue May 13, 2016
Signed-off-by: Rene Jochum <rene@jochums.at>
jochumdev added a commit that referenced this issue May 13, 2016
Signed-off-by: Rene Jochum <rene@jochums.at>
jochumdev added a commit that referenced this issue May 13, 2016
Signed-off-by: Rene Jochum <rene@jochums.at>
@thet
Copy link
Member Author

thet commented May 17, 2016

@pcdummy PlonePAS merged. PR for bda.plone.shop up not ready yet?

@jochumdev
Copy link
Contributor

Sorry, forgot to add a PR for this.

rnixx added a commit that referenced this issue May 17, 2016
Fixes ticket #66 by implementing a PlonePAS plugin for properties.
@rnixx rnixx closed this as completed May 17, 2016
@jochumdev jochumdev reopened this May 17, 2016
@jochumdev
Copy link
Contributor

jochumdev commented May 17, 2016

It works with Plone5 but i found a bug, the new Plugin must be last so this works and it doesn't get sorted in as the last one.

Will add a second PR soon.

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

No branches or pull requests

4 participants