-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
User Profile sometimes appears empty #76
Comments
Confirmed. Plone 5.1 |
I suspect the problem lies in the macro being called in the form template: <metal:b use-macro="context/@@ploneform-macros/titlelessform" /> which is from the plone.app.z3cform package. The member information is directly accessible from plone.app.users.account.AccontPanelForm.member within the account-configlet template. |
I am having the identical issue. |
I am having the identical issue too - it seems if I restart the Instance/the client after I added a member, this isn't an issue anymore, but I can't just keep restarting everytime I add a member. Any troubleshooting found? |
sadly, no. I am still occasionally get the problem. I posed on community.plone (https://community.plone.org/t/is-anyone-else-having-this-issue-with-user-data-not-being-saved/7257) and had experienced programmer @lukebrannon study issue and post on community. |
So, I am looking into this problem now. I printed the widget Informations in the Macro and the widget values seem to be empty. May be there is a problem with the function in the view. I'll keep you posted. By the way, I can't reproduce the problem after I restarted my client... |
Hi, thanks for the update. I've only had reason to update my site a few times and seems to be working. but I'm sure it's just waiting for a time when I really need to make and update. Then.... |
Hi. I'm not certain, but I just exported the Profiles (including member_data.xml und userschema.xml) and put them into my Theme-Profile-Folder. Afterwards i reinstalled the theme, added a new user, logged in (as the new user) and got on my "personal-information" page. This time my fields weren't empty anymore. May be this could be a solution? |
We have same problem on Plone 5.2 on Python 3.7. We checked Plone default site is no problem, but we got the problem when we have quick-installed our custom product. |
@cdw9 Did you fix this issue? or Do you have any workaround? |
@terapyon the only workaround I found was to restart the instance. But the data may "disappear" again after another user is added. |
@cdw9 Thank you for your workaround. But it is very troublesome for managing a lot of users. |
@cdw9 Do you have any idea for resolved without restarting. |
@terapyon Sorry, I do not. |
I am seeing this in a new install of 5.2.1 as well. This needs a fix other than restarting the instance after users are added. I am currently not in a position to trace the problem. I vote for labeling as a bug and making this a relatively high priority to solve for this module. |
this bug still presents in Plone 5.2.3 (5210). I tested with a new Plone without any custom modules. I investigated this bug and after opening the @@new-user form the schema of @@user-information changes from plone.supermodel.model.member-fields to plone.app.users.browser.interfaces.IAccountPanelForm the bug is raised only in background mode |
I just hit this problem aswell in Plone 5.2.5 (5213) And after reading ekulos report all I did was commeting this line: I don't know why it is required but without it the problem goes away and edition / creation keeps working as the schema it is not changed. |
@csanahuja no test failures when you do that? |
@tkimnguyen Not sure if I did something wrong but I get the same result either way (with/without change) I did
The result
|
After a while I got an error on creation, I suspect it is because the usage of the So I have remade the function to not use it:
I will report back if another error popups after this change |
Sorry, I deleted my previous post as it was missleading, I hope this one is not. So there are two functions to get the schema:
I think they replace each other their adapters so when the schema is cached they stop replacing the adapters leading to the schema switch. I did rewrite the two functions deleting the schema caching part
|
I am seeing this too at a site that we migrated this week from 4.3 to 6.0, and that I talk about next week at the Plone conference. I am having a look, but this is some seriously complicated code, with too much indirection. |
This helped me the other day, but still don't know if it could anyone else? |
What I see:
So what goes wrong?
One small remark: calling Let me first add this comment, before I lose it in an accident. :-) |
So how do we solve this mess? One way, as indicated by others above, is to completely ignore the volatile attributes: do not use this caching. But this code is called quite a lot when looking at user information, so I would rather keep this. What I am thinking of, is this: whenever we set the volatile attribute, remove the other volatile attributes. This means when you switch between user/personal information and registration form, you need to get the schema fresh and provide the adapter. So a bit more work than now, but at least the provided adapter will match the cached schema. But wait, are the volatile attributes per thread? I think so. So you can only remove them from the current thread, which means this idea does not completely work. We could cache it on the request instead of the portal. Does that seem like a good idea? I can try that. |
Branch: refs/heads/master Date: 2022-10-25T13:28:49+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.users@055767d Add regression tests for issue 76: user info appears empty. Actually, with the current code, test_regression_76_user_information fails and test_regression_76_personal_information passes. With manual testing in a site, they both fail. Files changed: M plone/app/users/tests/test_schema_types.py Repository: plone.app.users Branch: refs/heads/master Date: 2022-10-25T13:41:22+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.users@3b9c508 For user schemas use a volatile cache on the request instead of on the portal. This prevents seeing an empty user profile when you have custom user schemas. This fixes plone/plone.app.users#76. Files changed: A news/76.bugfix M plone/app/users/browser/account.py M plone/app/users/browser/register.py M plone/app/users/browser/userdatapanel.py Repository: plone.app.users Branch: refs/heads/master Date: 2022-10-31T15:38:38+01:00 Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> Commit: plone/plone.app.users@e32d33a Merge pull request #114 from plone/maurits-issue-76-empty-user-profile For user schemas use a volatile cache on the request instead of on the portal. Files changed: A news/76.bugfix M plone/app/users/browser/account.py M plone/app/users/browser/register.py M plone/app/users/browser/userdatapanel.py M plone/app/users/tests/test_schema_types.py
…e portal. This prevents seeing an empty user profile when you have custom user schemas. This fixes #76.
Branch: refs/heads/2.6.x Date: 2023-02-10T21:00:46+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.users@5ddec17 Add regression tests for issue 76: user info appears empty. Actually, with the current code, test_regression_76_user_information fails and test_regression_76_personal_information passes. With manual testing in a site, they both fail. Files changed: M plone/app/users/tests/test_schema_types.py Repository: plone.app.users Branch: refs/heads/2.6.x Date: 2023-02-10T21:42:12+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.users@b1fac96 For user schemas use a volatile cache on the request instead of on the portal. This prevents seeing an empty user profile when you have custom user schemas. This fixes plone/plone.app.users#76. Files changed: A news/76.bugfix M plone/app/users/browser/account.py M plone/app/users/browser/register.py M plone/app/users/browser/userdatapanel.py Repository: plone.app.users Branch: refs/heads/2.6.x Date: 2023-02-10T21:42:33+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.users@104b78f Fix regression when visiting personal information as Manager. Add extra test with Manager visiting both user and personal information. In the initial backport of this fix, I saw a regression: as Manager visit the user information of a member, then go to your personal information, and you see the fullname, etc, of the member. Tried on Plone 6 as well, but there it goes fine. Files changed: M plone/app/users/browser/userdatapanel.py M plone/app/users/tests/test_schema_types.py Repository: plone.app.users Branch: refs/heads/2.6.x Date: 2023-02-24T16:57:00+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.users@2f493bc Merge pull request #115 from plone/maurits-schema-caching-fix-52 Fix user schema caching for 5.2 Files changed: A news/76.bugfix M plone/app/users/browser/account.py M plone/app/users/browser/register.py M plone/app/users/browser/userdatapanel.py M plone/app/users/tests/test_schema_types.py
Tested on Plone 5.1.0.1, 5.1.3-pending
Steps to Reproduce:
Note that the data isn't actually missing, I was able to put a pdb into the user-information template and get the user's properties. Their data is safe as long as you don't click Save on the empty profile page.
The data displays again after restarting the instance, but then may disappear again after another user has been added
The text was updated successfully, but these errors were encountered: