Project

General

Profile

Actions

Bug #75862

closed

fluid_styled_content: fallback for template paths doesn't work

Added by Wolfgang Wagner almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2016-04-22
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

When I want to use own templates for fluid_styled_content, I add a template path with TS:

lib.fluidContent.templateRootPaths.100 = path/to/my/Templates/

This works in TYPO3 7, but not in TYPO3 8.0.1 or 8.1.0-dev
In 8, my own templates are ignored.
Is this a bug or has something changed in 8?


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #76476: Fluid templateRootPaths can not be overriden once setClosed2016-06-07

Actions
Related to TYPO3 Core - Bug #77631: templateRootPaths-Handling in TYPO3 8Closed2016-08-25

Actions
Related to TYPO3 Core - Bug #79061: Bug in extbase with TemplatesRootPaths in backendClosed2016-12-21

Actions
Actions #1

Updated by Philip Majewski almost 8 years ago

Wolfgang Wagner wrote:

When I want to use own templates for fluid_styled_content, I add a template path with TS:

[...]

This works in TYPO3 7, but not in TYPO3 8.0.1 or 8.1.0-dev
In 8, my own templates are ignored.
Is this a bug or has something changed in 8?

Had the same problem with an 8.1 installation. Set lib.fluidContent.partialRootPaths.200 to my custom partial files which weren't rendered at all.

I tried to overwrite the Header.html partial from fluid_styled_content but it wasn't included. When I changed the partial include in the original fluid_styled_content Template for Textmedia like so:

<f:render partial="Header2" arguments="{_all}" />

Where Header2.html was in my custom partialRootPaths it was rendered. So I think it is not possible to override extisting partials/templates.

Actions #2

Updated by Daniel Goerz almost 8 years ago

  • Category set to Fluid
  • Priority changed from Should have to Must have
Actions #3

Updated by Stefan Froemken almost 8 years ago

  • Status changed from New to Accepted

In resolveTemplateFileForControllerAndActionAndFormat() there is no sorting of the array keys. so it takes the first valid template with array key 0 which is the default one.

foreach ($this->getTemplateRootPaths() as $templateRootPath) {
    $candidate = $this->ensureAbsolutePath($templateRootPath . $action . '.' . $format);
    if (file_exists($candidate)) {
        return self::$resolvedFiles['templates'][$identifier] = $candidate;
    }
}

What about patching the getters with krsort?

public function getTemplateRootPaths() {
  krsort($this->templateRootPaths);
  return $this->templateRootPaths;
}

Stefan

Actions #4

Updated by Stefan Froemken almost 8 years ago

Currently Github throws a massive of 500 and 404 errors.

This is the related pull-request: https://github.com/TYPO3Fluid/Fluid/pull/104

Actions #5

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #6

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #7

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #8

Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #9

Updated by Gerrit Code Review almost 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #10

Updated by Gerrit Code Review almost 8 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #11

Updated by Daniel Goerz over 7 years ago

  • Target version set to 8.2
  • Sprint Focus set to Stabilization Sprint
Actions #12

Updated by Benni Mack over 7 years ago

  • Target version changed from 8.2 to 8.3
Actions #13

Updated by Gerrit Code Review over 7 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #14

Updated by Gerrit Code Review over 7 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #15

Updated by Gerrit Code Review over 7 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #16

Updated by Gerrit Code Review over 7 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #17

Updated by Gerrit Code Review over 7 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #18

Updated by Gerrit Code Review over 7 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #19

Updated by Matthias Toscanelli over 7 years ago

For those who need to make this works before the patch, simply redefine the paths like this:

lib.fluidContent{
    templateRootPaths >
    templateRootPaths {
        100 = path/to/my/Templates/
        10 = {$styles.templates.templateRootPath}
        0 = EXT:fluid_styled_content/Resources/Private/Templates/
    }
    partialRootPaths >
    partialRootPaths {
        100 = path/to/my/Partials/
        10 = {$styles.templates.partialRootPath}
        0 = EXT:fluid_styled_content/Resources/Private/Partials/
    }
    layoutRootPaths >
    layoutRootPaths {
        100 = path/to/my/Layouts/
        10 = {$styles.templates.layoutRootPath}
        0 = EXT:fluid_styled_content/Resources/Private/Layouts/
    }
}

Actions #20

Updated by Sergio Catalá over 7 years ago

Is there another workaround for FLUIDTEMPLATE objects?
I tried the previous code inside a FLUIDTEMPLATE page.10 object without success
I am not able to render any partials.

Actions #21

Updated by Benni Mack over 7 years ago

  • Target version changed from 8.3 to 8.4
Actions #22

Updated by Gerrit Code Review over 7 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #23

Updated by Gerrit Code Review over 7 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #24

Updated by Gerrit Code Review over 7 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #25

Updated by Gerrit Code Review over 7 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #26

Updated by Gerrit Code Review over 7 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #27

Updated by Gerrit Code Review over 7 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #28

Updated by Gerrit Code Review over 7 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48279

Actions #29

Updated by Helmut Hummel over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #30

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF