Bug #19737
closed
"No template found" error after adding extension template
Added by Dmitry Dulepov about 16 years ago.
Updated over 7 years ago.
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
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.
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.
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?
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.
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.
- 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)?
- 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.
- 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).
- Status changed from New to Accepted
- Assignee set to Markus Klein
- Target version set to 7.0
- Complexity set to easy
- 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
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
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF