[TYPO3-mvc] Custom Widget: Extension key "" was NOT loaded!

Hannes Lau office at hanneslau.de
Wed Jan 26 14:45:25 CET 2011


Hi list,

I am trying to implement a custom ViewHelper widget as a replacement for 
the PaginateViewHelper within an extbase extension that I am writing. 
Unfortunately I can not get even the most basic custom widget to work.

To start, I implemented a class Tx_JobFair_ViewHelper_PaginateViewHelper 
that contains injectController() and render(). Additionally I 
implemented a controller class Tx_JobFair_ViewHelper_PaginateController, 
which contains an indexAction.

The render method of my ViewHelper contains only one line:

	$this->initiateSubRequest();

I can see that my controller is instantiated and injected into the view 
helper. However, when initiateSubRequest is invoked, I get an exception 
"TYPO3 Fatal Error: Extension key "" was NOT loaded!".


Stack trace:

t3lib_extMgm::extPath("")

Tx_Fluid_View_TemplateView::getTemplateRootPath()

Tx_Fluid_View_TemplateView::expandGenericPathPattern("@templateRoot/@subpackage/@controller/@action. at format", 
boolean, boolean)

Tx_Fluid_View_TemplateView::getTemplateSource()

Tx_Fluid_View_TemplateView::canRender(Tx_Extbase_MVC_Controller_ControllerContext)

Tx_Extbase_MVC_Controller_ActionController::resolveView()

Tx_Extbase_MVC_Controller_ActionController::processRequest(Tx_Fluid_Core_Widget_WidgetRequest, 
Tx_Extbase_MVC_Web_Response)

Tx_Fluid_Core_Widget_AbstractWidgetController::processRequest(Tx_Fluid_Core_Widget_WidgetRequest, 
Tx_Extbase_MVC_Web_Response)

Tx_Fluid_Core_Widget_AbstractWidgetViewHelper::initiateSubRequest()


It seems that the subrequest that is created by the above line, does not 
contain a controllerExtensionKey. When Tx_Fluid_View_TemplateView:: 
getTemplateRootPath() wants to determine where to find the templates for 
the indexAction of my controller, it tries:

$this->controllerContext->getRequest()->getControllerExtensionKey()

But nothing is returned.

Do I have to specify my extension key somewhere, where the subrequest is 
able to pick it up? Has anyone else been able to get custom templates to 
work?

Hoping for help ;)
Hannes

-- 
Hannes Lau
[Berlin, GMT+2]


More information about the TYPO3-project-typo3v4mvc mailing list