I'm using a view with AJAX sorting and filtering, along with the "Show only filter options that would produce results" feature. It works perfectly in Safari but not in Chrome, where it endlessly loads. Disabling AJAX and the filter option resolves the issue in Chrome.
Solution:
The issue is related to a CORS error that occurs when accessing the site without the "www" prefix in the URL. The AJAX request is blocked because it is treated as a cross-origin request. To resolve this, you need to configure your server to include the Access-Control-Allow-Origin header for the admin-ajax.php file. This can be done by modifying your server's configuration:
1. For Apache:
Add the following to your .htaccess file:
<ifmodule mod_headers.c>
Header set Access-Control-Allow-Origin "https://mlpt.com"
Header set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header set Access-Control-Allow-Headers "Content-Type"
</ifmodule>
2. For Nginx:
Add the following to your server block configuration: