Bug #96290
openActionController->forward does not work when targetting another extension
0%
Description
I have a created some extensions for our instance of Typo3.
There is among other things a core extension that implements:
- a base controller: SelectedSiteController
- a template: Resources/Private/SelectedSite/DisplayNoSelectedPageWarning.html
The purpose of SelectedSiteController is to be inherited by other extensions which have a BE module needing a website (a page) to be selected in the page tree.
I've got two other extension which have a controller inheriting this base class SelectedSiteController
This class SelectedSiteController acts as a middleware before any action and get the currently selected website (page), or, if no page is currently selected, should display a basic template showing a 'Please select a website' message.
The SelectedSiteController class looks like this:
class SelectedSiteController extends ActionController
{
protected function callActionMethod() {
// looking for the current website
// ...
if(!$selectedWebsite) {
$this->forward('displayNoSelectedPageWarning', 'SelectedSite', 'MyCoreExt');
}
parent::callActionMethod();
}
protected function displayNoSelectedPageWarningAction() {}
}
Then, I have this class in another extension :
class MyController extends SelectedSiteController {
// various actions
}
If I don't precise the extension in the 'forward' method, the child controller look for the template DisplayNoSelectedPageWarning.html in its own extension.
But if I define it explicitly, I've got this error:
(1/2) #1278450972 TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException Class does not exist. Reflection failed. in /var/www/typo3/public/typo3/sysext/extbase/Classes/Reflection/ReflectionService.php line 125
No data to display