Bug #19737
closed"No template found" error after adding extension template
100%
Description
When a new extension template is added to the same page where main site template is located, it is placed to the topmost sorting position. After that this site shows "No template found" in FE. Moving extension template one position down solves the problem. It appears that TYPO3 assumes that the very first template will be the root TS template, which is wrong.
Suggested solution (make all of them!):
- proper search for root template
- send new TS templates to the end of the list
(issue imported from #M10006)
Files
Updated by Michel Tremblay over 14 years ago
This problem still exists in 4.4.
An easy solution would be to add the "root" field to the "order by" part of the query. See my patch.
Updated by Steffen Gebert over 14 years ago
Thanks for your patch, Michel!
Can you post it to the core team mailinglist to get this into the TYPO3 sources?
See http://typo3.org/teams/core/core-mailinglist-rules/
Updated by Markus Bucher over 14 years ago
Patch is not working in every case. When you have two extension templates the latter one is always being ignored.
You can test it yourself by providing an extension template with simply
page >
inside. If this template isn't the very first one it is ignored and doesn't have an effect whilst it breaks the page when it is.
Tested in 4.3 and 4.4.
Patch not working as it doesn't fix this problem.
Updated by Michel Tremblay over 14 years ago
The patch only assures that the "root" template will be loaded if present. This does not change the fact that TYPO3 only uses one template per page. This seems to be the normal behavior (maybe not good). Changing this behavior could probably cause problems on some existing sites.
Am I right?
Updated by Markus Bucher over 14 years ago
If you should not use more than one template you shouldn't be able to pick more than one.
And, furthermore, you do use more than one template, if you pick "include basis template". I would expect the same behavior here.
Updated by Francois Suter about 14 years ago
Markus, the behavior you described is a long-standing one: indeed, TYPO3 considers only the first template (extension or root) on a given page. I agree that it is confusing given that it's possible to define as many template records as you want. Still this is not related to this bug IMO, which is about making the root templates take precedence over the extension templates. In this regards the patch works for me.
A possible solution to the multiple template problem could be to show those extra template in the Template Analyzer and indicated that they are being ignored. But this would be a separate issue anyway.
Updated by Alexander Opitz about 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0) - Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.1.7)?
Updated by Alexander Opitz over 10 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this ticket.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Updated by Dmitry Dulepov over 10 years ago
- Category set to Frontend
- Status changed from Closed to New
- TYPO3 Version changed from 4.2 to 6.2
- PHP Version changed from 4.3 to 5.3
Yes, it is reproducible in TYPO3 6.2 (current master).
Updated by Markus Klein about 10 years ago
- Status changed from New to Accepted
- Assignee set to Markus Klein
- Target version set to 7.0
- Complexity set to easy
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/34319
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/34319
Updated by Markus Klein about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 604e8d22d0b1352b214ea6b083cc65c9c6b01532.
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed