I want to build an BE extension that is reading the repository from another extension and delivers the data as CSV/XSL/XSLX without saving it on the server. e.g Outputs the data in a blank window with modified headers.
The BE AJAX request is fired properly with
$TYPO3_CONF_VARS['BE']['AJAX']['tx_myext::ajaxID'] = 'filename:object->method';
The repository if called from the backend does work fine too.
public function ajaxAction() {
...
$this->extRepository =& t3lib_div::makeInstance('Tx_MySecondExt_Domain_Repository_DataRepository');
...
}
but when called from domain.tld/typo3/ajax.php?ajaxID=tx_myext::ajaxID
it doesnt find Tx_MySecondExt_Domain_Repository_DataRepository
also if i call the repository of the second repository with the findAll()
methode directly by AJAX. It does only return NULL.
also when setting the QuerySettings by hand
public function findAllexport() {
$query = $this->createQuery();
$query->getQuerySettings()->setRespectStoragePage(FALSE);
return $query->execute();
}
Also FYI its on 4.5
Edit:
Calling the repository with the ObjectManager doesn't work too
$objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
$this->extRepository = $objectManager->get('Tx_MySecondExt_Domain_Repository_DataRepository');
Did you make sure that the other extension is loaded before your own extension is loaded? Look at your localconf.php
. Normally you need to specify the dependencies in your ext_emconf.php
before you install your extension.
Also make sure that you have added both extension's configurations to the Static Includes of your TypoScript template.