I have the same problem, I do this, and finally the errors in console are:
"A bad HTTP response code (404) was received when fetching the script."
"Failed to load resource: net::ERR_INVALID_RESPONSE"
Thanks for the report. I remember seeing an issue where Cloudflare HTML minification was used on the server environment, and it broke Infinite Scrolling: https://toolset.com/forums/topic/infinite-scroll-replaces-first-10-posts-but-thereafter-works-properly/
May I ask if your site is on Cloudflare?
If not, please follow the troubleshooting steps I outlined in the other ticket:
- Temporarily deactivate all plugins except Types and Views, then activate a default theme like Twenty Nineteen
- Test again. If the problem is resolved, reactivate your theme and other plugins one by one until the problem returns.
- If the same browser console error appears after deactivating your theme and other plugins, let's try to get more information about the error by activating server logs. Go in your wp-config.php file and look for
define('WP_DEBUG', false);
Change it to:
define('WP_DEBUG', true);
Then add these lines, just before it says 'stop editing here':
ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
Reload the View on the front-end of the site and try to use the infinite scrolling feature again. If any server-side errors are generated, this will create an error_log.txt file in your site's root directory. Please send me its contents. Once that is done, you can revert the changes you made to wp-config.php.
The error that appears in error_log.txt is this:
[06-Feb-2019 14:23:08 UTC] PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /usr/home/enaranda/www/wp-includes/functions.php on line 3813
It appears repeatedly many times
I see lots of reports about this online, and they're all related to the zlib output compression module installed on the server. Do you have a phpinfo page available? Can you see if zlib compression is active? If you're not familiar with phpinfo, there's a description available here: https://toolset.com/toolset-requirements/
Basically you will create a text file and upload it to your server, then visit that URL to see different information about the PHP modules that are running. Search for
. If it's on, see if your host will turn it off. If it's off, see if your host will turn it on. Let me know what you find out.
Hello,
I set zlib.output_compression = Off into .php.ini file, and error "PHP Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in ..." has disappeared.
Now, I've tried to deactivate all plugins (except types and views) and activate Twenty Nineteen 1.2 theme, but error
"A bad HTTP response code (404) was received when fetching the script."
"Failed to load resource: net::ERR_INVALID_RESPONSE"
appears in console again, and infinite scroll doesn't work.
May I log in to your wp-admin area to take a look? I will activate private reply fields here.
It's very strange, but somehow the data for the Search and Pagination section had become corrupted. It looked okay in wp-admin, but somehow in the database it was not set correctly. I added a line break to the filters editor to trigger an update. Then I resaved the View, and it appears to be working as expected now. Can you confirm?
Yes, it works correctly now. I think that solution is unmark "Disable the wrapping DIV around the View" option in view.
This was the problem. Thank you for your help.
My issue is resolved now. Thank you!
There is a fatal error mentioned here in the ticket for which this erratum might be a resolution:
https://toolset.com/errata/unknown-fatal-error-when-activating-toolset-access/