Using this snippet call: [[!pdoPage? &parents=[[++site_news]] &limit=9 &tpl=item_nieuws &ajaxMode=scroll ]]
I get this error in the console when I scroll the page or with &ajaxMode=button as well: jquery-3.5.1.min.js:2 POST https://c0618.paas1.ams.modxcloud.com/assets/components/pdotools/connector.php 500
The php error log shows this: [07-Apr-2022 14:16:11 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Using $this when not in object context in /paas/c0618/www/assets/components/pdotools/connector.php:8 Stack trace: #0 {main} thrown in /paas/c0618/www/assets/components/pdotools/connector.php on line 8
Can I fix this somehow or should I report this with pdoTools repo - I couldn’t find it.
I had to change it via nano in the terminal as ModxCloud doesn’t allow editing php files, but the error is gone. Thanks a lot.
Still have to figure out how to make pdoPage load more content on scroll, as the rtfm is not that elaborate about that.
And yes I have jQuery loaded and no errors in the console.
The manual mentions making an Ajax request like $.get('document.html?page=5', function(response) { console.log(response); }, 'json');
I’m not sure if that will help if the page has to load more items on scroll. Or is that just meant as a way to initialize the built-in script from pdoPage that handles the loading of extra items?
I guess I have to write an on-scroll handler that makes the Ajax request to a page or the same page?
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.