Project

General

Profile

Actions

Bug #81021

closed

Fatal error in fluid_template with switchableControllerActions, one plugin and a shared layout

Added by Dominik Hahn almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-04-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello guys,

I am porting and old extension to 8.7.1 and came across this problem:

A very simple extension: One controller, two actions.
Both actions have their own fluid template, both share the layout "Resources/Private/Layouts/Default.html"

One registered plugin called "Main" and switchableControllerActions in a Flexform to make both actions selectable for the editors.

Everything is fine when I use the plugin on a single page only once.

As soon as I add the plugin a second time (with another action or even the same action selected) I get the following error on the page in the frontend:

Fatal error: Cannot declare class layout_default_ca646fe3088961927af32c308d5f12419c385887, because the name is already in use in /srv/www/public/sites/customer01/web/typo3temp/var/Cache/Code/fluid_template/layout_default_ca646fe3088961927af32c308d5f12419c385887.php on line 0

The error is gone upon first reload after clearing the cache and it comes back with the second reload.

So far I can only "fix" it by disabling the second plugin or by duplicating the layout file and setting the layout of the second action to the new layout file so that the actions don't share the same layout file.

TYPO3: 8.7.1
Server: Apache/2.4.7 (Ubuntu)
PHP: 7.0.17-2+deb.sury.org~trusty+1

TYPO3 is currently running in production context.

If you need any more information, just ask.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #79760: FLUIDTEMPLATE not rendered when Layout name collides with Layout name of FSCClosed2017-02-11

Actions
Actions #1

Updated by Jay Dinse almost 7 years ago

I have a similar problem. Fixed it by rename my Layout-File from "Default.html" to "Main.html" and used this name in my templates.

There must be some weird error in the fluid extension causing this.

Actions #2

Updated by Jacco van der Post almost 7 years ago

I encounter this problem too on FluidTemplate for main config of site, no extensions installed except for own config extension. The layout file seems not to be allowed to be called 'Default'. When renaming it, no error anymore.
8.7.2

Actions #3

Updated by Philipp Idler over 6 years ago

I had a similar issue today and found a solution.
In former TYPO3 versions (< 8) you could declare your layout as "Default.html" and use it in your template with <f:layout name="default"/> (no case sensitive!).
Since TYPO3 8 the layout name is case sensitive, so check your templates and change your layout name to match the convention: <f:layout name="Default"/>

Please provide some feedback if it fixes your issue.

Actions #4

Updated by Clemens Riccabona over 6 years ago

  • Related to Bug #79760: FLUIDTEMPLATE not rendered when Layout name collides with Layout name of FSC added
Actions #5

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from New to Closed

The patch from #79760 has been merged, so I close this one for now, as it should be solved. Please reopen if it occurs again (or ping me and I'll do that). Thank you!

Actions

Also available in: Atom PDF