• Resolved hmcody

    (@hmcody)


    I have been working on a local version of my website to enable the Member Directory function of Ultimate Member. I am using the default Members form in the Members Directory section, but I over rode the the members-grid.php template by placing it the ultimate-member folder under my theme folder. I used Pods to allow backend editing of my custom fields.

    On my local site, everything works as expected. I can edit members on the front end and back end, and the directory displays all of the correct members in the format that I designed.

    When I tried to implement the changes on my production site, I can still edit on the front and back ends, but I cannot get the member directory to display any records. The only differences between the local site and production site are 1) local runs on PHP server in Visual Studio Code while production is on a Lightspeed server, 2) Production uses https while local does not. I used Duplicator to copy the site from production to local before I started making changes, so everything else should be identical.

    I have tried removing all filters from the directory (originally set to select for role Members and a custom field, online_directory = Yes), but that doesn’t make a difference. I have checked that both Members and Administrators can view other member profiles (and tried viewing the directory from both an Admin account an a Member account). I have cleared my cache using LightSpeed and the User Cache using Ultimate Member. I have enabled the Twenty Twenty-Three theme rather than my custom theme. I have deactivated all of the plugins with the exception of Ultimate Member. I tried removing my custom members-grid.php template and re-checking the templates on the Override Templates tab, to use the default members-grid.php. None of this allows any records to display.

    It seems that something is happening to result in the data that is being passed to the template to contain no information (data.length > 0 is NOT true), but I am at a loss as to what else to check. I can create a pure php list of users and display them using a shortcode, so my guess is that it is a problem with REST, but I have no clue how I would troubleshoot such a problem.

    Any other suggestions?

    Thanks!

Viewing 46 replies (of 46 total)
  • Thread Starter hmcody

    (@hmcody)

    I figured it out!

    I cleared out the debug.log on both local and production, then opened the Members page on both to create a new debug.log. I was then able to compare the two and found that production had a query parameter as follows:

                        [1] => Array
                            (
                                [key] => um_member_directory_data
                                [value] => s:15:"hide_in_members";b:0;
                                [compare] => LIKE
                            )

    It turned out that Settings->General->Account->Hide Profiles From Directory by Default was checked on production but not on local. Unchecking it on production allowed everyone who should appear to do so.

    Thanks for all of your help, @missveronicatv ! I couldn’t have sorted this out without your code snippets.

Viewing 46 replies (of 46 total)
  • The topic ‘Member Directory works on localhost but is empty on production’ is closed to new replies.