I have created a custom View (using Views UI) that provides a table of members for users. Only members ("authenticated users) of the non-profit can see the view.
If anyone checks the "Private" checkbox, an error message appears at the top of the view. The view still functions and the links to the user pages work, with the proper fields hidden. The error message does confuse users, though. They're sure something has gone wrong, when it hasn't.
"Notice: Trying to get property of non-object in user_field_privacy_field_access() (line 190 of /home3/mwsadisp/public_html/sites/all/modules/user_field_privacy/user_field_privacy.module)."
Again, does not affect the functionality at all for the users. And administrators do not see this error message.
Comments
Comment #1
PoetCSW commentedI went ahead and hid alerts / messages from users. Still, I wonder what the underlying issue is.
Comment #2
boobaaCould you please either attach the export of your view and/or pinpoint the exact views stuff (field, filter, argument, whatever) which triggers the message?
Comment #3
PoetCSW commentedI can export the view this weekend and post it.
Comment #4
simon georges commentedI have the exact same issue.
The problem is that $entity is NULL.
You'll find the export of the View I'm currently using.
Comment #5
boobaaUh-oh, you're having quite a bunch of fields in that view of yours. Could you please either:
1. attach a feature that has both your user fields and your view, or
2. (which would be even better) provide a _minimal_ example that triggers the message? By minimal I mean the stuff you provide should lead me to the error in the minimal time, most likely with only one field added to the user entity and to the view.
Comment #6
simon georges commentedSure, I see what you mean. Let me get back to you with it.
Comment #7
simon georges commentedSo, to reproduce:
1. Add a field on the user entity (in my example "Name").
2. Create 2 users (or use admin and user2). On one (admin or user1), make the field private and fill it, on the other one, leave it public.
3. Create a view on Users displaying the field (that's the only important thing, every other settings seems to have no importance).
4. Display the view (as a non-admin user, like user2), you should see the message.
Comment #8
sr631 commentedI'm having the same issue. In my case none of my users have chosen to mark a field as private, but the error still occurs. (so it is not dependent on the field actually being private) I also am seeing it repeated 3 times no matter how many users I have - I'm not sure if that's just me, or if it may be helpful.
I also want to reiterate Simon's #4 above - you only see the error when you're logged in as a non-admin. (It took me a while of thinking things were fine before I noticed that.)
Thanks!
Comment #9
boobaaThanks for reporting, this has been fixed; will roll a release with this soonish.