#81415Section does not exist exception if extension layout file is named "Default"
Description
We are upgrading a TYPO3 v6 website to v8 LTS (with upgrading to 7 LTS first).
The website was built with `CSS styled content`, but with `FLUIDTEMPLATE` for the main page template rendering.
We still don’t have `Fluid styled content` installed.
| Problem: | Exception ‘Section “xyz” does not exist.’ |
Custom extension
The problem occurs in a custom extension
Some extension resources:
Resources/Private
- Layouts/Default.html
- Templates/Data/New.html
We get the exception with the following file contents:
Layout “Default.html”:
<f:render section="xyz"/>
Template:
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <f:layout name="Default"/> <f:section name="xyz">...</f:section> </html>
The extension works if we rename the layout file
Layout “Foo.html”:
<f:render section="xyz"/>
Template:
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <f:layout name="Foo"/> <f:section name="xyz">...</f:section> </html>
Note: Changing the case of the layout file does not work
Rendering of the main template
We created a “master” extension that contains some common defaults for all our projects called “iresults_master”.
And a the “client” extension that will contain project specific stuff.
The master extension is also responsible to configure the main template rendering:
# Create the page
page = PAGE
page.typeNum = 0
# Create FLUID Template
page.10 = FLUIDTEMPLATE
page.10 {
# Assign the Template files with the Fluid Backend-Template
templateName = TEXT
templateName.stdWrap {
wrap = |
cObject = TEXT
cObject {
data = levelfield:-2,backend_layout_next_level,slide
override.field = backend_layout
split {
token = pagets__
1.current = 1
1.wrap = |
}
}
ifEmpty = 12-col
}
layoutRootPaths {
10 = EXT:frontend/Resources/Private/Layouts
20 = EXT:iresults_master/Resources/Private/Layouts
30 = EXT:client/Resources/Private/Layouts
}
partialRootPaths {
10 = EXT:frontend/Resources/Private/Partials
20 = EXT:iresults_master/Resources/Private/Partials
30 = EXT:client/Resources/Private/Partials
}
templateRootPaths {
10 = EXT:frontend/Resources/Private/Templates
20 = EXT:iresults_master/Resources/Private/Templates
30 = EXT:client/Resources/Private/Templates/Page
}
}
One of the page template files
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <f:layout name="Default"/> <f:section name="content">...</f:section> </html>
As you can see, the standard layout file for our pages is also called “Default”
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.