Support » Plugin: Ultimate Member – User Profile, User Registration, Login & Membership Plugin » Member Directory Broken after update to 2.1.5

  • Resolved Jerry Stewart

    (@jerrystewart99)


    After updating from 2.1.0 to 2.1.5 my Member Directory appears to be broken.

    I have 74 members.
    My theme is Divi.
    This issue appears similar to: https://wordpress.org/support/topic/member-directory-broken-after-update/

    The symptoms are as follows:
    Using UM 2.1.0, the directory works fine. All 74 members show in the directory.
    After updating to 2.1.5:
    If I log in as admin, I can see all members in the directory as usual, however,
    If I log in as a member or log out entirely I can see only 2 members.

    Reverting to 2.1.0, everything is fine again.

    I have checked and double-checked every setting in Member Directory and even recreated the Member Directory from scratch in case it somehow got corrupted.

    I cannot see any material difference from the 2 members that do show up from the ones that don’t show up.

    I have recreated the entire site on localhost using xampp. I get identical results.

    I have tried adding a new user using the um registration process. The new user does not show up in the directory unless logged in as admin.

    I have tried disabling all other plugins. Same result.

    Please advise what else to try.

    I have had to revert to 2.1.0 until I can find a fix or a workaround.

    Thank you, Jerry

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jerrystewart99

    Does the “Upgrade” show in the UM Admin Dashboard after updating the UM to the latest version?

    Regards,

    Thread Starter Jerry Stewart

    (@jerrystewart99)

    Hi @champsupertramp
    Thanks for your reply.
    Yes it does, both in the Ultimate Member Dashboard and the Plugins page

    The install info for my localhost site follows. I have the same symptoms on the live site.

    thanks for your time, Jerry

    ### Begin Install Info ###

    ## Please include this information when posting support requests ##

    — Site Info —

    Site URL: http://localhost/crystalvalley-auckland
    Home URL: http://localhost/crystalvalley-auckland
    Multisite: No

    — Hosting Provider —

    Host: DBH: localhost, SRV: localhost

    — User Browser —

    Platform: Windows
    Browser Name: Firefox
    Browser Version: 76.0
    User Agent String: Mozilla/5.0 (Windows NT 10.0; Wi
    n64; x64; rv:76.0) Gecko/2010010
    1 Firefox/76.0

    —- Current User Details —

    Role: administrator, um_admin

    — WordPress Configurations —

    Version: 5.4.1
    Language: en_NZ
    Permalink Structure: /%postname%/
    Active Theme: Divi 4.4.4
    Page On Front: Home (#14)
    Page For Posts: (#0)
    ABSPATH: C:\xampp\htdocs\crystalvalley-auckland/
    All Posts/Pages: 7
    WP Remote Post: wp_remote_post() works
    WP_DEBUG: Enabled
    WP Table Prefix: Length: 14, Status: Acceptable
    Memory Limit: 256MB

    — UM Configurations —

    Version: 2.1.5
    Upgraded From: 2.1.5
    Current URL Method:
    Cache User Profile: Yes
    Generate Slugs on Directories: Yes
    Force UTF-8 Encoding: No
    JS/CSS Compression: Yes
    Port Forwarding in URL: No
    Exclude CSS/JS on Home: No

    — UM Pages Configuration —

    User: http://localhost/crystalvalley-auckland/user/
    Account: http://localhost/crystalvalley-auckland/account/
    Members: http://localhost/crystalvalley-auckland/members/
    Register: http://localhost/crystalvalley-auckland/register/
    Login: http://localhost/crystalvalley-auckland/login/
    Logout: http://localhost/crystalvalley-auckland/logout/
    Password Reset: http://localhost/crystalvalley-auckland/password-reset/

    — UM Users Configuration —

    Default New User Role: 0
    Profile Permalink Base: user_login
    User Display Name: full_name
    Force Name to Uppercase: No
    Redirect author to profile: Yes
    Enable Members Directory: Yes
    Use Gravatars: No
    Require a strong password: Off

    — UM Access Configuration —

    Panic Key:
    Global Site Access: Site accessible to Everyone
    Backend Login Screen for Guests: No
    Redirect to alternative login page:
    Backend Register Screen for Guests: No
    Redirect to alternative register page:
    Access Control widget for Admins only: No
    Enable the Reset Password Limit: Yes
    Reset Password Limit: 3Disable Reset Password Limit for Admins: No
    Blacklist Words: 5

    — UM Email Configurations —

    Mail appears from: PAnzA
    Mail appears from address: admin@panza.org.nz
    Use HTML for E-mails: Yes
    Account Welcome Email: Yes
    Account Activation Email: No
    Pending Review Email: No
    Account Approved Email: No
    Account Rejected Email: No
    Account Deactivated Email: Yes
    Account Deleted Email: Yes
    Password Reset Email: Yes
    Password Changed Email: Yes

    — UM Total Users —

    All Users(78)
    administrator(1)
    um_on-hold(3)
    um_life-member(3)
    um_fellow-member(2)
    um_clinical-member(67)
    um_associate-member(2)
    um_admin(1)
    none(0)

    — UM Roles —

    Administrator (administrator)
    Editor (editor)
    Author (author)
    Contributor (contributor)
    Subscriber (subscriber)
    Trainee Member (um_trainee-member)
    On Hold (um_on-hold)
    Life Member (um_life-member)
    Fellow Member (um_fellow-member)
    Clinical Member (um_clinical-member)
    Associate Member (um_associate-member)
    Admin (um_admin)

    — UM Custom Templates —

    N/A

    — UM Email HTML Templates —

    N/A

    — Web Server Configurations —

    PHP Version: 7.1.9
    MySQL Version: 5.5.5
    Web Server Info: Apache/2.4.27 (Win32) OpenSSL/1.0.2l PHP/7.1.9

    — PHP Configurations —

    PHP Memory Limit: 256M
    PHP Upload Max Size: 250M
    PHP Post Max Size: 300M
    PHP Upload Max Filesize: 250M
    PHP Time Limit: 60
    PHP Max Input Vars: 1000
    PHP Arg Separator: &
    PHP Allow URL File Open: Yes

    — Web Server Extensions/Modules —

    DISPLAY ERRORS: N/A
    FSOCKOPEN: Your server supports fsockopen.
    cURL: Your server supports cURL.
    SOAP Client: Your server does not have the SOAP Client enabled.
    SUHOSIN: Your server does not have SUHOSIN installed.
    GD Library: PHP GD library is installed on your web server.
    Mail: PHP mail function exist on your web server.
    Exif: PHP Exif library is installed on your web server.

    — Session Configurations —

    Session: Disabled
    Session Name: PHPSESSID
    Cookie Path: /
    Save Path: C:\xampp\tmp
    Use Cookies: On
    Use Only Cookies: On

    — WordPress Active Plugins —

    Category Posts Widget: 4.9.5
    Import and export users and customers: 1.15.6.2
    Logged In As: 1.0.0
    Maintenance: 3.85
    PAnzA Admin:
    Post SMTP: 2.0.11
    Ultimate Member: 2.1.5

    ### End Install Info ###

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jerrystewart99

    Could you please check if “Enable custom table for usermeta” is turned on in WP Admin > Ultimate Member > Settings > Misc?

    Regards,

    Thread Starter Jerry Stewart

    (@jerrystewart99)

    Hi @champsupertramp
    The option “Enable custom table for usermeta” is not selected.
    Would you recommend selecting it?

    thanks, – Jerry

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jerrystewart99

    Sorry for the late response.

    Could you please try turning it on and see if the issue goes away?

    Feel free to re-open this thread if there’s any question that may come up.

    Regards,

    Thread Starter Jerry Stewart

    (@jerrystewart99)

    Hi @trampsuperchamp

    This issue is certainly not resolved. I have set the status back to not-resolved.

    I have tried turning on the ‘Enable custom table for usermeta’.

    The upgrade process completed without error and I observe that wp_um_metadata is populated.

    The result is that the member search is now not functional at all. (recall that it was functional if logged in as Admin) The symptoms are now:
    1. No members appear in the search although I note that the ‘paging’ option at the bottom of the screen is active and showing that there are 5 pages of results.
    2. The debug log shows the following SQL error when showing the ‘Members Directory’:

    [29-May-2020 04:03:20 UTC] WordPress database error Unknown column 'u.username' in 'order clause' for query SELECT SQL_CALC_FOUND_ROWS DISTINCT u.ID
    				
    				FROM XXX_wp_users AS u
    				LEFT JOIN XXX_wp_um_metadata umm_roles ON ( umm_roles.user_id = u.ID AND umm_roles.um_key = 'XXX_wp_capabilities' )
    				WHERE 1=1 AND ( umm_roles.um_value LIKE '%\"um_trainee-member\"%' OR umm_roles.um_value LIKE '%\"um_life-member\"%' OR umm_roles.um_value LIKE '%\"um_fellow-member\"%' OR umm_roles.um_value LIKE '%\"um_clinical-member\"%' OR umm_roles.um_value LIKE '%\"um_associate-member\"%' )
    				
    				 ORDER BY u.username ASC 
    				LIMIT 0, 12 made by do_action('wp_ajax_um_get_members'), WP_Hook->do_action, WP_Hook->apply_filters, um\core\Member_Directory_Meta->ajax_get_members

    My SQL is a little rusty but table wp_users ( alias: u ) does not have a column called ‘username’ .. shouldn’t it be ‘user_login’.. ??

    In summary, my existing problem still exists and turning on ‘Enable custom table for usermeta’ seems to add a new problem.

    I’m reasonably proficient with php. Let me know if there is anything you would like me to try in order to debug this issue.

    Thanks
    – Jerry

    Thread Starter Jerry Stewart

    (@jerrystewart99)

    Hi @champsupertramp

    I’ve figured out what has been going on and have resolved this thread.

    For anyone else with similar problems maybe the following will help:

    UM have introduced a new row in {db_prefix_}wp_usermeta as follows:
    (somewhere between 2.1.0 and 2.1.5 I think)

    meta_key = 'um_member_directory_data'
    meta_value = 'a:5:{s:14:"account_status";s:8:"approved";s:15:"hide_in_members";b:0;s:13:"profile_photo";b:0;s:11:"cover_photo";b:0;s:8:"verified";b:0;}'

    If this row is missing for a given user then that user will not show up in the Member Directory unless you are logged in as admin.

    The meta_value string above is a serialized array. It’s straightforward to understand.
    see this link. or this link.
    Basically a=array, s=string, b=boolean
    In the above example:
    account_status is approved
    hide_in_members is false (zero)
    profile_photo is false
    cover_photo is false
    verified is false

    If your member had a profile photo but no cover photo the entry would look like this:
    meta_value = 'a:5:{s:14:"account_status";s:8:"approved";s:15:"hide_in_members";b:0;s:13:"profile_photo";b:1;s:11:"cover_photo";b:0;s:8:"verified";b:0;}'

    This usermeta row is used to filter out members from the directory that have ‘hide_in_members’ set and optionally members that don’t have a cover and/or profile photo. If the row is missing it defaults to ‘hide’.

    I managed to massage my table with some sql to insert the rows required. All is now well.

    I’m not too sure how or why the rows didn’t get added as part of the Ultimate Member version upgrade process but hey…

    I can confirm that new members added after upgrading to 2.1.5 have ‘um_member_directory_data’ added to usermeta.

    – Jerry

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Member Directory Broken after update to 2.1.5’ is closed to new replies.