Support » Plugin: Ultimate Member – User Profile, User Registration, Login & Membership Plugin » Member directory not working for non-admin users

  • Resolved 1968phillip

    (@1968phillip)


    If the logged in user has the administrator role the member directory works fine. If I change the role of the user to be any other role, including a UM role I’ve created, the member directory does not work.

    Digging a little deeper and looking at the browser console and network traffic I can see that when the user has the administrator role the AJAX response from the um_get_members call is the data that is expected. When the user does not have the administrator role, the AJAX call returns the HTML of the home page (as seen in the console).

    Why does the member directory only work for admin users?

    I’m running WP 5.7.2, UM 2.1.21 and have no caching plugin active.

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

    (@champsupertramp)

    Hi @1968phillip

    Could you please provide screenshots of your Member Directory settings? You can upload the screenshots via imgur.com and then share the URL here so we can review them.

    Regards,

    Thread Starter 1968phillip

    (@1968phillip)

    Thanks for the prompt response Champ. The screenshots for the settings pages can be found in the ZIP at http://www.thethomases.com.au/download/UMSettings.zip
    Kind regards
    Phil

    Thread Starter 1968phillip

    (@1968phillip)

    Thanks for the prompt response @champsupertramp. The screenshots for the settings pages can be found in the ZIP at http://www.thethomases.com.au/download/UMSettings.zip
    Kind regards
    Phil

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @1968phillip

    Sorry for the late response.

    Could you please try creating a new Member Directory without changing anything in the settings? Let’s see if this issue still occurs. Also, do you have any UM extensions installed on your site?

    Regards,

    Thread Starter 1968phillip

    (@1968phillip)

    Hi @champsupertramp
    I created a new member directory as you’ve asked and left all the settings as default, with the exception of selecting to view members with the subscriber role. I added the new member directory (short code) to a new page.
    When accessing that new page I experience the same problem. If the logged in user does not have the administrator role nothing appears on the page, yet if the user is assigned the administrator role the member directory on the page works. Looking at the console (Chrome developer tools), when the directory fails I get the HTML of the home page displayed in the console log. I see this is what the Javascript code is meant to be doing on error.
    I do not have any UM extensions installed.
    To me, it seems to be an issue with the AJAX call. Are there other things I can be doing to help troubleshoot or debug?
    Kind regards
    Phil

    Thread Starter 1968phillip

    (@1968phillip)

    Hi @champsupertramp

    I’ve resolved the issue!

    Further investigation suggested that some WordPress themes can cause issues with AJAX. I tried one of the default WordPress themes instead of the theme I was using and everything worked fine. Investigating the theme further it was also trying to manage access to the admin bar for non-admin users – but seems to be doing it incorrectly as it was mucking up AJAX. I can switch to another theme.

    Thanks for your help to date.

    Kind regards
    Phil

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @1968phillip

    Thanks for letting us know. I’m marking this as resolved now.

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.