Opened 13 years ago
Closed 12 years ago
#4233 closed defect (bug) (fixed)
Privacy features don't work?
Reported by: | Mqlte | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Extended Profile | Keywords: | |
Cc: |
Description
Howdy,
Yesterday I tested the latest version of BuddyPress in the "trunk"-folder. But I noticed that all privacy settings don't seem to be working? I tried to generally hide some profile fields in the backend for "Guests" but they're still visible. Additionally, I didn't find a function in my own profile to customize the privacy settings for each field in my profile.
Regards
Attachments (1)
Change History (15)
#2
@
13 years ago
Thanks for your answer.
[quote]Note that, in order to do this, you'll have to change that field's Default Visibility level, and *also* set it so that users are unable to customize the visibility level (set Per-Member Visibility to "Enforce the default visibility...".quote
I exactly did this but it didn't take effect.
Here: http://www.replaying.de/mitglieder/
There shouldn't be visible anything except the name for visitors. But everything - is - visible.
[quote]This is theme-dependent. If you're not using the BuddyPress Default theme, or a proper child theme of bp-default, you won't see them. If you *are* using bp-default, you should find the settings at Profile > Edit, right under each field.quote
I'm using it in my own theme with the really helpful BuddyPress Template Pack. What must I add to the theme files?
Regards
#3
@
13 years ago
- Component changed from Core to XProfile
- Keywords reporter-feedback removed
- Milestone changed from Awaiting Review to 1.6
OK, I had a closer look. It looks like there was an error in the way that the admin-forced defaults were interacting (or failing to interact) with user settings.
#5
@
13 years ago
Thanks for your answer. Unfortunately your fix doesn't solve the problem for me. I also refreshed or saved the privacy settings in the backend again. Do you suppose that this problem concerns only my page?
Thanks for your help anyway.
#6
@
13 years ago
It's hard to tell from what you've given me to work with. The feature is working properly on my setup.
There is still a slight inconsistency in that the Super Admin will appear to be able to change his visibility setting, even on fields where the setting is admin-enforced. So make sure that you test using a non super admin.
If it's still not working, greater debugging will be necessary. Please let me know how comfortable you are doing this kind of debugging. (If you already know how to do it, please do so.)
#7
@
13 years ago
Ok, I'll try to explain it more precisely. Please take a look a the screenshot "test.JPG" again. I use these settings ("Logged in Users" and "Enforce the default visibility for all members") for nearly every field on my page. If I have understood correctly, guests won't see these fields on the user profile pages anymore if I use these settings. And that's the problem, because every guest is still able to see every profile field.
Take a look: http://www.replaying.de/mitglieder/malte/
Every field below "Ich im Netz" shouldn't be visible for guests who aren't logged in.
Well, I've never done debugging in BuddyPress before. ;-)
#8
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks for the more detailed explanation. Unfortunately, the information that I really need is technical, including debugging breakpoints and stuff like that. I'll try to take another look in the upcoming days, but it may come down to me giving you instructions on how to debug yourself, as there's only so much I can do when I can't reproduce the issue on my own installations.
You aren't, by chance, running some sort of page caching plugin? If so, try deleting the cache.
#9
@
13 years ago
Nope, I'm not running a plugin like "WP Super Cache" or "W3 Total Cache" and won't do it. If you can't solve the problem, feel free to explain me how to debug. Thanks for your help.
#10
@
13 years ago
Okay, I discovered the following behaviors:
- The privacy settings only seem to work in the first profile group, which appears on the signup page.
- The privacy settings don't work at all for my own profile (administrator). Every field is always visible.
- Users cannot change the field's visibility because there's no option in the profile.
I hope you'll get something out of it. ;)
Regards
#11
@
13 years ago
(In [6069]) In bp_get_the_profile_field_options(), don't delete properties from $field global
bp_get_the_profile_field_options() expects the $field global object to be an
instance of BP_XProfile_Field, because it needs access to that class's
get_children() method. Inside of a profile loop, however, $field is *not* an
instance of this class. So bp_get_the_profile_field_options() clears $field and
replaces it with a new instance of BP_XProfile_Field. However, this has the
side effect of wiping out any custom data that has been manually inserted into
the $field global (for instance, data and visibility_level). This meant that
visibility level was being reset in the case of radio button and other
get_children() fields.
This changeset works around the problem by ensuring that the new
BP_XProfile_Field object contains all of the properties of the $field global
before it is replaced; when they are missing, they are supplied by the
manually-created $field global before it is replaced with the new object.
It will be a good idea down the road to revisit the way that the profile loop
is set up, so that the BP_XProfile_Field is used as much as possible, making
this kind of switcheroo unnecessary.
See #4233
#12
@
13 years ago
Mqlite - Thanks for the additional details.
The privacy settings only seem to work in the first profile group, which appears on the signup page.
Thanks for this detail. It turns out that this was caused by a very obscure bug in BP that has, to my knowledge, been there forever, but has never really shown itself before. r6069 should fix it.
Users cannot change the field's visibility because there's no option in the profile.
As I mentioned above, this is a theme-level change. If you have a custom theme (such as one created by the BP Template Pack), you will have to manually add the visibility settings logic to members/single/profile/edit.php. If you haven't modified that template in your theme, just copy the entire contents over from the trunk version into your theme.
The privacy settings don't work at all for my own profile (administrator). Every field is always visible.
I can't reproduce this. Try again with the latest changes, and if you're still having this issue, please give detailed instructions on how to reproduce.
#13
@
13 years ago
Thanks, your fix solved my problem after I resaved all settings.
I noticed another, little issue:
- If you click on the "Change"-link to change the visibility of the chosen profile field, the selected visiblity doesn't refresh. For example if it's "This field can be seen by: Anyone" and you select in the box "Logged in Users" it's still "This field can be seen by: Anyone". However, if you save the settings your changes will be carried over.
Regards
#14
@
12 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Great, so glad to hear that it's working now! Thanks again for testing and reporting your issues.
I'm aware of the issue you've mentioned - I was just too lazy to do it the first time around :) It's an enhancement, so I've opened a separate ticket: #4248.
Note that, in order to do this, you'll have to change that field's Default Visibility level, and *also* set it so that users are unable to customize the visibility level (set Per-Member Visibility to "Enforce the default visibility...".
This is theme-dependent. If you're not using the BuddyPress Default theme, or a proper child theme of bp-default, you won't see them. If you *are* using bp-default, you should find the settings at Profile > Edit, right under each field.