Project

General

Profile

Actions

Bug #81021

closed

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

Added by Dominik Hahn over 7 years ago. Updated almost 7 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

Also available in: Atom PDF