pdoPage and Agenda ajax button not loading more Elements

I combine pdoPage with Agenda, which basically works well.
6 entries are displayed and also the “load more” button.
Unfortunately, no more entries are loaded when the button is clicked. The elements are only softened, but nothing else happens.

On another resource, pdoPage is already used with pdoResource and it works perfectly there.

Here is my call:

<div id="pdopage">
<div class="uk-grid-column-large uk-grid-row-medium uk-child-width-1-2@m termine uk-grid-match uk-margin-large-bottom rows" uk-grid >
	&wrapperTpl=`@INLINE [[+output]]`
	&daterangeFormat=`j.| F |Y|, |G|:i| \U\h\r`
	&end=`today +1 year 0:00`
	&ajaxTplMore=`@INLINE <a href="#" class="button btn-more">mehr laden ...</a>`

If you open the developer tools in the browser (usually F12 or CTRL + Shift + i), are there any errors in the console?

If you open the “Network” tab of the developer tools and then click the “load more” button. Is the AJAX-call successful? Is the response value of this AJAX-call correct?

I get a 500 Internal Server Error.

POST: assets/components/pdotools/connector.php
Status: 500 Internal Server Error
Version: HTTP/2
Übertragen: 1,21 KB (0 B Größe)
Referrer Policy: strict-origin-when-cross-origin

HTTP/2 500 Internal Server Error
x-powered-by: PHP/8.1.2
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
strict-transport-security: max-age=31536000
content-length: 0
content-type: text/html; charset=UTF-8
date: Sat, 19 Feb 2022 10:01:10 GMT
server: Apache
X-Firefox-Spdy: h2

MODX 2.8.3
PHP 8.1

There should be a server error log somewhere on the server where 500 errors are logged. It could be helpful to have the specific error message. The exact location of this error file depends on the server configuration. (This is not the MODX error log file.)


Uncaught Error: Call to a member function getParameters() on null in 
/home/k000409/www/17/htdocs/core/components/agenda/model/agenda/agendaevents.class.php:477\nStack trace:\n#0
/home/k000409/www/17/htdocs/core/components/agenda/model/agenda/agendaevents.class.php(357): AgendaEvents->getCategories()\n#1
/home/k000409/www/17/htdocs/core/components/agenda/src/Snippets/ListSnippet.php(142): AgendaEvents->toExtendedArray()\n#2
/home/k000409/www/17/htdocs/core/cache/includes/elements/modsnippet/31.include.cache.php(22): TreehillStudio\\Agenda\\Snippets\\ListSnippet->execute()\n#3
/home/k000409/www/17/htdocs/core/model/modx/modscript.class.php(76): include('...')\n#4
/home/k000409/www/17/htdocs/core/components/pdotools/model/pdotools/pdotools.class.php(362): modScript->process()\n#5
/home/k000409/www/17/htdocs/core/cache/includes/elements/modsnippet/17.include.cache.php(143): pdoTools->runSnippet()\n#6
/home/k000409/www/17/htdocs/core/model/modx/modscript.class.php(76): include('...'...', referer: https://domain.de/

Unfortunately Agenda isn’t an open source extra, so I can’t check the source code.

Does your page work correctly, if you call it directly with a GET-parameter “page” (...mypage.html?page=2)?

Maybe something in Agenda isn’t initialized correclty, if the snippet is called via the pdoTools-connector.

Maybe try the specific forum or contact the author directly.

The site works correctly with the GET-parameter.
I will connect the support of Agenda.

$modx->request is not initialized inside of pdoPage. That was the issue. It is fixed in the next version.