Bug #61361
closedFluid template path fallback doesn't work in TypoScript object FLUIDTEMPLATE
Added by Ian Solo over 10 years ago. Updated about 7 years ago.
100%
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
Updated by Anja Leichsenring over 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
Updated by Gerrit Code Review over 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
Updated by Ian Solo over 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".
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Updated by Anja Leichsenring about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3b6de8a3aef7d015261bed85b2ca0b5376caa70a.
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.
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.
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.
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.
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
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.
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.
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.
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?
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
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)
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
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
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.
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
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
Updated by Markus Klein about 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 1747ec195386a95793080810008c0671338ec0e2.
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
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
Updated by Markus Klein about 10 years ago
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
Updated by Ian Solo about 10 years ago
Tested and voted +1. Thank you very much Markus!
Updated by Anja Leichsenring about 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset f582179a089a2306271fbb4d3b97d954e010fab9.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed