Project

General

Profile

Actions

Bug #105593

closed

Extbase action via userFunc Bootstrap->run: Overrule templateRootPaths seems not to work

Added by Alex Kellner 8 days ago. Updated 7 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2024-11-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I just stumbled over the issue that it seems not possible to add additional templateRootPaths via TypoScript when using TYPO3\CMS\Extbase\Core\Bootstrap->run for an action (in TYPO3 12 and 13).

How to reproduce

Extension A: ext_localconf.php

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
  'Lux',
  'Test',
  [\In2code\Lux\Controller\FrontendController::class => 'test']
);

Extension A: TypoScript setup

test = PAGE
test {
  typeNum = 123456

  10 = USER_INT
  10 {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    extensionName = Lux
    pluginName = Test
    vendorName = In2code
    controller = Frontend
  }
}

Extension A: Controller

<?php

declare(strict_types=1);
namespace In2code\Lux\Controller;

use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

class FrontendController extends ActionController
{
    public function testAction(): ResponseInterface
    {
        return $this->htmlResponse();
    }
}

The HTML template from Path EXT:lux/Resources/Private/Templates/Frontend/Test.html is used for templateRootPaths.0 (even if it is not explicitly defined in TypoScript) - what's correct.

But if an additional Extension sets another path with .10, the original path is still used:

plugin.tx_lux_test.view.templateRootPaths.10 = EXT:luxenterprise/Resources/Private/Templates/Frontend


If I doublecheck the paths by simply removing the original template file, the additional file is used correctly. Even the used TypoScript seems to be correct in backend.

A debug of the ActionController seems to be okay for me:

0 => 'EXT:lux/Resources/Private/Templates/' (36 chars)
1 => 'EXT:luxenterprise/Resources/Private/Templates/Frontend' (54 chars)

Actions

Also available in: Atom PDF