Skip Navigation

[Resolved] Switching to AJAX results breaks search results layout

This thread is resolved. Here is a description of the problem and solution.

Problem:

I was having a problem with permissions for search results (searching by author triggered a "You do not have access to this page message) and traced that back to Defender Pro plugin.

Solution:

Toolset AJAX search feature is using wordpress built-in AJAX URL to send the request, for example:

https://SITE-URL/wp-admin/admin-ajax.php

You need to exclude wp-admin/admin-ajax.php from Defender Pro plugin.

Relevant Documentation:

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Julie Tuerk 2 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#2293243
op-ed.png

Tell us what you are trying to do? I was having a problem with permissions for search results (searching by author triggered a "You do not have access to this page message) and traced that back to Defender Pro plugin. The makers of the plugin did some troubleshooting and found that if they switched from “Full page refresh when visitors click on search button” to “Ajax result update when visitors click on search button” on the Op-Ed archive page fixed the error message but also broke the search results layout. So it seems there was a conflict with Defender and the page refresh that was happening. Additionally, I'm seeing a warning on the backend of the op-ed page (see screenshot). I'm wondering if this is related and how I can fix that.

staging.wildearthguardians.org/op-eds
password: Wild!
and then you have to search to see the broken layout

#2293711

Hello,

I have checked the URL you mentioned above, but don't see the problem.

And Toolset AJAX search feature is using wordpress built-in AJAX URL to send the request, for example:
hidden link
You will need to check the plugin author of Defender Pro plugin, check how to allow user to use above URL in your website, and I have searched it in google, found the solution in below thread:
hidden link

For your reference.

More help:
https://codex.wordpress.org/AJAX_in_Plugins

#2294583
op-eds-search-results.jpg
op-eds-search-correct.png

Hi I think we have it backwards. Switching TO Ajax fixes the conflict with Defender, but breaks the search results layout. Please see screenshots.
Can you please also respond about the warning I'm seeing on the back end of the archive page (screenshot in first message), which may or may not be related?
Thank you

#2294817
JS-error-5.jpg

I have checked your website page again:
staging.wildearthguardians.org/op-eds
But I see a lots of JS errors in it, see my screenshot JS-error-5.JPG

Those JS errors are from other plugins, you need to fixe them first, it will prevent AJAX from working.

Did you can contact Defender Pro support for how to exclude wp-admin/admin-ajax.php from their plugin?

#2299197

My issue is resolved now. Thank you!