Closed develth closed 3 years ago
There seems to be a problem with dtermining the default storagePid correctly. Could you check which typoscript configuration is loaded for your extension?
For testing you can put \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($GLOBALS['TSFE']->tmpl->setup['config.']);die;
at about line 88 of \Aoe\Restler\System\Dispatcher.php and then call the desired api endpoint.
Please be aware that you are not inside of an extbase plugin context during restler operation and as such the settings from plugin.tx_PLUGIN.persistence do not apply.
You can see the applied settings inside of your repository after creating a query object.
DebuggerUtility::var_dump($query->getQuerySettings()->getStoragePageIds());die;
Thanks for your feedback @sven-carstens
What do you mean with Could you check which typoscript configuration is loaded for your extension?
exactly?
When doing the dump in the Dispatcher, i found nothing about the regarding extension
You can see the applied settings inside of your repository after creating a query object. DebuggerUtility::var_dump($query->getQuerySettings()->getStoragePageIds());die;
It is 0
Thanks!
I tried to set the $defaultQuerySettings->setStoragePageIds(array($pid));
, but it was ignored by the create process.
After debugging the Code, i found a check for config.tx_extbase.persistence.classes.CLASS.newRecordStoragePid
When i set this, it worked!
We for sure need more documentation with all special cases for Typo3 V9 and up.
Hello!
I made some endpoints to my extbase extension. Creating Objects work - but no deletion. After checking the pid of the objects (that i created via the API), they are all set to 0. In the
restler_examples
Extension the 'old' (non v9) configuration is given and that sets a specific pageUid in the Controller (that creates or deletes). This way does not seems to exist anymore. How is it done now via the middleware? Should that be done by that feature?Current Code for create and delete (removed the null / duplicate checks for better readability):
Create:
Delete:
I already debugged the remove function of the Repository - the
addedObjects
is empty.Thanks & Best Thomas