Members Missing from list
-
I had a member tell me that he is no longer listed in members directory page.. After checking I noticed about 3 do not show.. and they are not set to be hidden… Wondering how to fix this??
Thanks
John
-
Did those users make their profiles private? Is your member directory configured to show the user role that each missing person has?
They may have by accident.. playing with their profile.. I don’t know.. All I know is the one member that is complaining that his profile is not listed there.. doesn’t remember hiding it.. None the less all profiles are marked not hidden now… And his and about 3 others do not show in the directory.. and yes the the user role is set properly to show all members and admin.. I saw somewhere else that another website was having problems with someone hiding the profile and later tried to un-hide it and it still stays hidden… The answer I saw then was that they were going to try to duplicate the problem on another web site and see if that happens.. That was just a couple days ago… Well I am having the same problem.. it seems.. Not sure if anyone has a resolution for it or not..
Thanks very much..
JohnSame thing’s happened to me tonight. A member emailed to say they are missing from the member’s lists. Their profile can still be reached via a link but they are not listed in the member’s lists. They’ve not hidden themselves and I know that the settings are correct and nothing has changed to make this happen.
Further,
I’ve just tested with my own account and when you click to hide your profile (which does hide it from the list) and then reset it to show, the profile is still hidden!How to fix please?
A couple of easy things to try:
1. Disable any caching plugin or service.
2. Clear your browser cache or visit the site using a private browsing or incognito window.Both 1 & 2 may result in inability to access a user profile page in UM.
I don’t have a caching plugin.. I cleared the browser cache… and did as you said… Then I created a dummy user account… logged in as the dummy and set my account to hidden… Later reset it to not hidden.. now the profile is totally missing from the members directory.. can not get it to come back no matter what I do…
What to do now.. I have seen this problem posted elsewhere.. must me something wrong somewhere.. need a fix.. hate to lose one of my best members because of this..
Thanks
Johnwhere, in the database is the hide/show variable stored? Maybe we can at least reactivate from the database until a fix is found?
I have no idea. Fairly new at this… 🙁
I’m seeing the same thing. I took a look at the plugin’s code where it attempts to delete the flag that marks the profile as private. It is looking for a property named “hide_in_members”, but the POST data shows its sending it as “hide_in_members[]”, so it never makes it into the block of code that deletes the flag. So then when it goes to retrieve the list of member’s, it always checks to make sure that flag does not exist. But since it never deletes it, it only sets its value to “No”, the member gets filtered.
So I see 2 ways to fix the issue. 1) Fix the input name to not set it as an array and/or 2) Update the query to check for the flag being No or not present.
As a workaround before you save the account page, if you run the following javascript code in your browsers javascript console, it should clear out the privacy setting (presumably until you save the account page again without the javascript block)
document.getElementsByName('hide_in_members[]').forEach(function(el){el.setAttribute('name', 'hide_in_members')});Thanks for that reply ammmze but that was a bit too advanced for my novice brain 🙂
Is there a variable stored in the database that I can at least alter via MyphpAdmin to reset the hidden member? then I can switch off the privacy option for members until a proper fix is found?
thanksI see these two but do not know how to edit them.. if these are what is suppose to be edited.. I am a novice also..
function get_tab_output( $id ) { global $ultimatemember; $output = null; switch( $id ) { case 'notifications': $output = apply_filters("um_account_content_hook_{$id}", $output); return $output; break; case 'privacy': $args = 'profile_privacy,hide_in_members'; $args = apply_filters('um_account_tab_privacy_fields', $args ); $fields = $ultimatemember->builtin->get_specific_fields( $args ); $fields = apply_filters('um_account_secure_fields', $fields, $id ); foreach( $fields as $key => $data ){ $output .= $ultimatemember->fields->edit_field( $key, $data ); } And Also this one function predefined_fields_hook( $predefined_fields ){ $account_hide_in_directory = um_get_option('account_hide_in_directory'); if( ! $account_hide_in_directory ){ unset( $predefined_fields['hide_in_members'] ); } return $predefined_fields; }Yea…if you’ve database access you can delete any record in the
wp_usermetatable where themeta_keyishide_in_membersand themeta_valueis NOT ‘Yes’.So something like this should get them all at once…
DELETE FROM wp_usermeta WHERE meta_key = 'hide_in_members' and meta_value <> 'Yes';Note: I don’t have access to a DB to verify the query, but it should be fairly straight forward
Deleted that as told above.. But it only restored one user… Still have others missing??
shortly after deleting that .. my database crashed … Luckily I had a backup…
Looks like it’s storing it as a serialized array. So you actually probably want this query…
DELETE FROM wp_usermeta WHERE meta_key = 'hide_in_members' and meta_value NOT LIKE '%Yes%';I also have a code change which I’ve applied to one of the plugin files until the issue is resolved. This change updates the query used to list members to take into account the flags that are set but are not set to Yes.
Using the WordPress built-in Plugin Editor, I edited the file
ultimate-member/core/um-filters-members.phpI replaced lines 49-53 with the following
$query_args['meta_query'][] = array( 'relation' => 'OR', array( 'key' => 'hide_in_members', 'value' => '', 'compare' => 'NOT EXISTS' ), array( 'key' => 'hide_in_members', 'value' => 'Yes', 'compare' => 'NOT LIKE' ) );For reference this is what lines 49-53 looked like before:
$query_args['meta_query'][] = array( 'key' => 'hide_in_members', 'value' => '', 'compare' => 'NOT EXISTS' );
The topic ‘Members Missing from list’ is closed to new replies.