Project

General

Profile

Actions

Bug #61361

closed

Fluid template path fallback doesn't work in TypoScript object FLUIDTEMPLATE

Added by Ian Solo about 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
Start date:
2014-09-05
Due date:
% Done:

100%

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

Description

It looks like that the useful fallback feature of Fluid is implemented only in class TemplateView and not in class StandaloneView.

So a Typoscript like this doesn't work:

page {
  10 = FLUIDTEMPLATE
  10 {
  partialRootPath >
  partialRootPaths {
    10 = EXT:bootstrap_package/Resources/Private/Partials/Page/
    20 = EXT:my_extension/Resources/Private/Partials/Page/
  }
}

and produce a FE error:
Partial root path "typo3conf/ext/bootstrap_package/Resources/Private/Templates/Page/Partials" does not exist

IMHO, since this feature has been implemented in 6.2, it must be available also for TypoScript object FLUIDTEMPLATE and in TYPO3 6.2


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #63066: FluidTemplateContentObject uses deprecated methodsClosedMarkus Klein2014-11-19

Actions
Related to TYPO3 Core - Bug #63367: superfluous ucfirst() kills FE rendering with FLUIDTEMPLATEClosedMarkus Klein2014-11-27

Actions
Precedes TYPO3 Core - Bug #63380: FLUIDTEMPLATE: New fallback paths miss stdWrapClosedAnja Leichsenring2014-11-27

Actions
Actions #1

Updated by Anja Leichsenring about 10 years ago

  • Project changed from 2559 to TYPO3 Core
  • Category set to Fluid
  • TYPO3 Version set to 6.2
  • Is Regression set to No
Actions #2

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New 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 http://review.typo3.org/32613

Actions #3

Updated by Ian Solo about 10 years ago

Thank you for the patch.
I tested it but it seems that it doesn't work.

I used the same Typoscript of the bug report and now this error is produced in the FE:
Could not load partial file. Tried following paths: "typo3conf/ext/bootstrap_package/Resources/Private/Templates/Page/Partials/Navigation/Main.html", "typo3conf/ext/bootstrap_package/Resources/Private/Templates/Page/Partials/Navigation/Main".

Actions #4

Updated by Gerrit Code Review about 10 years ago

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

Actions #5

Updated by Gerrit Code Review about 10 years ago

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

Actions #6

Updated by Gerrit Code Review about 10 years ago

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

Actions #7

Updated by Gerrit Code Review about 10 years ago

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

Actions #8

Updated by Gerrit Code Review about 10 years ago

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

Actions #9

Updated by Gerrit Code Review about 10 years ago

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

Actions #10

Updated by Gerrit Code Review about 10 years ago

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

Actions #11

Updated by Gerrit Code Review about 10 years ago

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

Actions #12

Updated by Gerrit Code Review about 10 years ago

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

Actions #13

Updated by Gerrit Code Review about 10 years ago

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

Actions #14

Updated by Gerrit Code Review about 10 years ago

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

Actions #15

Updated by Gerrit Code Review about 10 years ago

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

Actions #16

Updated by Gerrit Code Review about 10 years ago

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

Actions #17

Updated by Gerrit Code Review about 10 years ago

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

Actions #18

Updated by Gerrit Code Review about 10 years ago

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

Actions #19

Updated by Anja Leichsenring about 10 years ago

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

Updated by Ian Solo about 10 years ago

Hello,
this bug has been marked Resolved one month ago but I don't see these changes in TYPO3_6-2-7-dev.

Btw, I manually updated the code of StandaloneView.php and it doesn't seems to work or I didn't get how to make it work.

My Typoscript related to this is:

...
partialRootPath >
partialRootPaths {
  10 = EXT:bootstrap_package/Resources/Private/Partials/Page/
  20 = EXT:iandefault/Resources/Private/Partials/Page/
}
...
I get this exception:
#1288092556: Could not load partial file. Tried following paths: "typo3conf/ext/bootstrap_package/Resources/Private/Templates/Page/Partials/Navigation/Main.html", "typo3conf/ext/bootstrap_package/Resources/Private/Templates/Page/Partials/Navigation/Main".

Am I missing something?

Thanks in advance for your help.

Actions #21

Updated by Gone With the Wind about 10 years ago

Hi,

it seems that
dirname($this->templatePathAndFilename)

in
public function getLayoutRootPaths() {...} [line 208ff]

returns a path that always adds "[...]Page/" to the path.

Actions #22

Updated by Ian Solo about 10 years ago

Hi Robert,
thanks for the hint.
I'm not a core developer or and expert but as far as I know that is correct cause "$this->templatePathAndFilename" is the full path of the template.
Instead I think that the problem reside on how this var is used in class StandaloneView to get paths for Layouts or Partials cause this logic suppose that those paths are in subfolders of the Template folder and this never happens.

@Anja please, re-open this bug cause it's not resolved.
Thanks.

Actions #23

Updated by Markus Klein about 10 years ago

Guys, the code has not been merged into 6.2!
There is NO fallback for paths in 6.2.
It should work on current master though.

Actions #24

Updated by Ian Solo about 10 years ago

Guys, the code has not been merged into 6.2!

The target TYPO3 Version of this bug has been set to 6.2 by a core developer, so I expect this to work in 6.2.

There is NO fallback for paths in 6.2.

It's clear that there is no fallback for paths in 6.2, that's why I opened this bug report.

It should work on current master though.

I tested on current master 7.0-dev and it doesn't seem to work.

I used this simple Typoscript:

page = PAGE
page {
  10 = FLUIDTEMPLATE
  10 {
    file = fileadmin/Resources/Templates/Default.html
    layoutRootPaths {
      10 = fileadmin/Resources/Layouts/
    }
  }
}

Result:

Uncaught TYPO3 Exception
#1288092555: Could not load layout file. Tried following paths: "fileadmin/Resources/Templates/Layouts/Default.html", "fileadmin/Resources/Templates/Layouts/Default"

As you can see "Templates/" has been added to the path and it shouldn't be.

Again, please, reopen this bug cause it's not resolved.
Thanks

Actions #25

Updated by Markus Klein about 10 years ago

  • Status changed from Resolved to On Hold
  • Target version set to 7.0

Hi Ian,

the "Target version" has never been set for this issue as far as I can see. It was reported for 6.2.
Features may only be added to the master branch.

I'll ask Ernesto as Release Manager, if he would accept a backport to 6.2, but before we can do that we have to ensure it works on master. Hope that I can give this a test run soon.

Actions #26

Updated by Markus Klein about 10 years ago

  • Status changed from On Hold to Accepted
  • Priority changed from Should have to Must have

I had a deeper look now again:

  • Using multiple paths does not work with the TypoScript ContentObject FLUIDTEMPLATE. The feature is simply not implemented.
  • Only the StandaloneView itself is capable of fallback paths. So extensions may use it.
  • The patch merged for StandaloneView is actually not ok, as it deprecates methods that are still used in Core.

This indeed needs several followups.

Actions #27

Updated by Markus Klein about 10 years ago

Markus Klein wrote:

  • The patch merged for StandaloneView is actually not ok, as it deprecates methods that are still used in Core.

This is fixed with #63066.

Actions #28

Updated by Ian Solo about 10 years ago

Hi Markus,
I tested https://review.typo3.org/#/c/34340/ and is not working with TS mentioned above:

page = PAGE
page {
  10 = FLUIDTEMPLATE
  10 {
    file = fileadmin/Resources/Templates/Default.html
    layoutRootPaths {
      10 = fileadmin/Resources/Layouts/
    }
  }
}

Same result:
Uncaught TYPO3 Exception
#1288092555: Could not load layout file. Tried following paths: "fileadmin/Resources/Templates/Layouts/Default.html", "fileadmin/Resources/Templates/Layouts/Default".

Is that TS working for you?

Actions #29

Updated by Gerrit Code Review about 10 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 http://review.typo3.org/34343

Actions #30

Updated by Markus Klein about 10 years ago

  • Status changed from Under Review to Accepted

@Ian Devlin: https://review.typo3.org/#/c/34340/ was just about cleaning up some stuff. It does not fix this issue here. (that's why it references a different ticket)

Actions #31

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Accepted to Under Review

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

Actions #32

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34344

Actions #33

Updated by Ian Solo about 10 years ago

http://review.typo3.org/34343 works in 7.0dev

But unluckily http://review.typo3.org/34344 doesn't work in 6.2 tested with same TS setup in comment 28 it gives the same error.

Actions #34

Updated by Gerrit Code Review about 10 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34344

Actions #35

Updated by Gerrit Code Review about 10 years ago

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34344

Actions #36

Updated by Markus Klein about 10 years ago

  • Status changed from Under Review to Resolved
Actions #37

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Resolved to Under Review

Patch set 4 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34344

Actions #38

Updated by Gerrit Code Review about 10 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34421

Actions #39

Updated by Markus Klein about 10 years ago

@all review

We have patches ready now for 6.2, please test these.

You have to apply
https://review.typo3.org/#/c/34344/4
and
https://review.typo3.org/#/c/34421/1

Please report feedback right in Gerrit and please don't forget to vote there as well, you'll earn points!
Thanks

Actions #40

Updated by Ian Solo about 10 years ago

Tested and voted +1. Thank you very much Markus!

Actions #41

Updated by Anja Leichsenring almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #42

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF