0
votes

I have a TYPO3 extension to access stored entries in the database (kind of a news-list).

This works well when I directly call the extension. But then I have to load more entries via ajax and this is when everything fails.

I used this tutorial to build the extension: http://www.sklein-medien.de/en/tutorials/detail/building-an-typo3-extension-with-ajax-call/#c83

In my Typoscript, I have

plugin.tx_myext.persistence.storagePid = 123
plugin.tx_myext.settings.typeNum = 12345678

These settings seem to get lost when I make the ajax-call. I have to hardcode the settings into the setup.ts of the extension (myext/Configuration/TypoScript/setup.ts).

The problem is, that when I move the extension to another server, I'd have to edit the extension everytime to adjust the settings, instead of being able to set them via Typoscript.

Any ideas what could be wrong?

1
A shot in the dark. Have you tried to set plugin.tx_myext_myplugin.persistence.storagePid? As mentioned here in step 3 it will override the extension setting.El Devoper
Config was made correct - turns out, the problem was the URL of the ajax-call. But thanks for your thoughts!Swissdude

1 Answers

0
votes

Apparently, I just called the wrong URL.

Initially, I called «index.php» in the ajax-call.

I had to call the URL of the page the plugin is on (e.g. /en/mypage/mypagewithplugin).

Then, the call was made, but T3 complained about the cHash not being calculated. So I changed the ajax-call from GET to POST and it was working.