وردپرس

Member Directory works on localhost but is empty on production


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!

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا