Skip Navigation

[Résolu] AJAX Pagination stopped working

This support ticket is created Il y a 4 années et 2 mois. 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/Karachi (GMT+05:00)

This topic contains 3 réponses, has 2 voix.

Last updated by jeffS-2 Il y a 4 années et 2 mois.

Assisted by: Waqar.

Auteur
Publications
#1458579

I am trying to:
I have several pages using Views paging with AJAX option. These have been working fine for a few years. I don't know when it stopped working exactly, but sometime in the past couple months. Now, clicking on any page number (2,3,4,5,10,15,20, etc.) the window gets a dim overlay, and then nothing further. Occurs in Safari, FF, MS-Edge. Chrome and others not tested.
Switching to the "Pagination with page reload" option works fine.

Link to a page where the issue can be seen:
hidden link

I expected to see:
The next page (or page number selected.)

Instead, I got:
Dimmed overlay and then nothing.

I noticed there is a 403 Forbidden error (2) in the console coming from /wp-admin/admin-ajax.php, but I cannot understand what is happening there:

<quote>
Summary
URL: hidden link
Status: 403
Source: Network
Address: 104.28.0.38:443
Initiator:
jquery.js:1:90449

Request
:method: POST
:scheme: https
:authority: californiaconsultants.org
:path: /wp-admin/admin-ajax.php
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json, text/javascript, */*; q=0.01
Host: californiaconsultants.org
Accept-Language: en-us
Accept-Encoding: br, gzip, deflate
Origin: hidden link
Referer: hidden link
Connection: keep-alive
Content-Length: 379
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15
Cookie: wordpress_sec_37c590fe46a8d37bf6f7f6996ecf7c55=cnsv3_wpadmin%7C1579207737%7CKUZh4FaK5Evv09TKCkZDh2GGkHZTmpjZhPVMmHLlzqx%7C17e890d5b02ba0dad669183d2b199dc6f81684879405e5e2e0ce6221781477d7; edit-question-joyride=ridden; messages-overview-joyride=ridden; transaction-overview-joyride=ridden; event-categories-joyride=ridden; venue-add-venue-joyride=ridden; venue-overview-joyride=ridden; contact-list-overview-joyride=ridden; registration-overview-joyride=ridden; question-groups-overview-joyride=ridden; questions-overview-joyride=ridden; critical-pages-joyride=ridden; admin-options-joyride=ridden; your-organization-joyride=ridden; event-default-settings-joyride=ridden; templates-settings-joyride=ridden; event-overview-joyride=ridden; final-stop-tour=ridden; event-editor-joyride=ridden; _ga=GA1.2.642411145.1576094130; _gid=GA1.2.1254744148.1579033857; _gat=1; mp_a36067b00a263cce0299cfd960e26ecf_mixpanel=%7B%22distinct_id%22%3A%20%2216ef6890b333aa-0733c27436c60b-48183300-fa000-16ef6890b342aa%22%2C%22%24device_id%22%3A%20%2216ef6890b333aa-0733c27436c60b-48183300-fa000-16ef6890b342aa%22%2C%22%24initial_referrer%22%3A%20%22https%3A%2F%2Fcaliforniaconsultants.org%2Fwp-admin%2Fplugins.php%22%2C%22%24initial_referring_domain%22%3A%20%22californiaconsultants.org%22%7D; wordpress_logged_in_37c590fe46a8d37bf6f7f6996ecf7c55=cnsv3_wpadmin%7C1579207737%7CKUZh4FaK5Evv09TKCkZDh2GGkHZTmpjZhPVMmHLlzqx%7C9ed9a8e2c807d2f096e9b195a5afa18882092983f3bf18f920b96a0a4829eea1; wordpress_test_cookie=WP+Cookie+check; wp-settings-11=editor%3Dhtml%26ed_size%3D801%26libraryContent%3Dbrowse%26wplink%3D1%26hidetb%3D1%26imgsize%3Dfull%26urlbutton%3Dnone%26align%3Dcenter%26widgets_access%3Doff%26posts_list_mode%3Dlist%26dfw_width%3D606%26post_dfw%3Doff; wp-settings-time-11=1578550949; __cfduid=daa5846f775593e569dbf1ee1061d8f011550708312
X-Requested-With: XMLHttpRequest

Response
:status: 403
Content-Encoding: br
Referrer-Policy: no-referrer-when-downgrade
X-XSS-Protection: 1
Date: Tue, 14 Jan 2020 21:29:52 GMT
Vary: Accept-Encoding, Authorization
Content-Type: text/html
X-Content-Type-Options: nosniff
x-cacheable: YES
Server: cloudflare
x-fw-hash: yg807txw4o
x-timer: S1579037392.163540,VS0,VE93
x-fw-version: 5.0.0
x-served-by: cache-lax8649-LAX
x-fw-static: NO
fastly-restarts: 1
x-fw-serve: TRUE
x-cache-hits: 0
x-fw-server: Flywheel/5.1.0
expect-ct: max-age=604800, report-uri="hidden link"
x-fw-type: VISIT
x-cache: MISS
cf-cache-status: DYNAMIC
cf-ray: 5552b534ea7bd36a-LAX

Request Data
MIME Type: application/x-www-form-urlencoded; charset=UTF-8
view_number: 30076
page: 2
sort[wpv_sort_orderby]
sort[wpv_sort_order]
sort[wpv_sort_orderby_as]
sort[wpv_sort_orderby_second]
sort[wpv_sort_order_second]
environment[archive][type]
environment[archive][name]
extra[wpv_view_count]: 265
extra[wpv_paged]: 10
expect: full
action: wpv_get_view_query_results
id: 30076
wpv_view_widget_id: 0
</quote>

I temporarily changed the most important page to "Pagination with page refresh" option until I can fix the AJAX problem:
hidden link
(but, of course this is not an ideal option.)

Thanks,
Jeff Safire
---------------------

#1459275

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Jeff,

Thank you for contacting us and I'd be happy to assist.

The endpoint "yourwebsite.com/wp-admin/admin-ajax.php" is a standard and secure gateway for the dynamic requests when something needs to be performed without reloading the page and is used by WordPress, themes, and plugins.
( ref: https://codex.wordpress.org/AJAX_in_Plugins )

But as you noted, on your website these requests are being blocked with error 403 (Forbidden Error).

Have you installed any new security plugin or changed its configuration, recently? I'll recommend making sure that WordPress, active theme and plugins are all updated to the latest versions and then check these pages with AJAX pagination again.

It would also be a good idea to test this with all non-Toolset plugins disabled and with a default theme like Twenty Twenty. If it is fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.

In case the issue still persists, please consult your hosting's support team, to check if their security policies are blocking such requests.

I hope this helps and please let me know how it goes.

regards,
Waqar

#1466365

Waqar -

Thanks for the reply.
I have already deactivated all plugins except my four Toolsets (Types, Views, Forms, Access) and changed the theme to 2019. I also checked for any incompatibilities with PHP 7.2 and did not find any.
If I change all AJAX pagination to Page Refresh, the errors go away. I have contacted my Web host (Flywheel/WP Engine) and will wait to hear what they find before I close this ticket.

Jeff Safire
–––––––––––

#1466823

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.