Issue Bug Closed

#71197Including relative Paths with INCLUDE_TYPOSCRIPT not possible on subpages with "root" templates

Daniel Goerz 10/31/15, 14:38 updated 10/21/17, 17:36

Description

Steps to reproduce:

  1. Create a new page tree with a root template
  2. Create a subpage with a root template itself (check “clear setup” ceckbox und options!)
  3. Include the static file of fluid_styled_content in the template of the subpage
  4. Go to ObjectBrowser of this template and choose “setup”
  5. The relative paths e.g. to ./Setup/lib.parseFunc.ts could not be resolved

Reason: In \TYPO3\CMS\Core\TypoScript\TemplateService there are three arrays $config, $constants and $templateIncludePaths. These need to be in sync so that the method processIncludes can work properly. Unfortunatly if a checkbox for clearing constants or setup is checked the following code kicks in:

 if ($row['clear']) {
    $clConst = $row['clear'] & 1;
    $clConf = $row['clear'] & 2;
    if ($clConst) {
        $this->constants = array();
        $this->clearList_const = array();
    }
    if ($clConf) {
        $this->config = array();
        $this->hierarchyInfoToRoot = array();
        $this->clearList_setup = array();
    }
}

Here $this->constants and/or $this->config it set to an empty array which braks the sync to $this->templateIncludePaths. The array $this->constants and $this->config must not be altered in terms of number of containing items but mus instead only contain empty items if they have been cleared.

Reviews 2