Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Backend Template breaks content columns #563

Open
mkrappitz opened this issue Nov 29, 2024 · 3 comments
Open

Custom Backend Template breaks content columns #563

mkrappitz opened this issue Nov 29, 2024 · 3 comments
Assignees

Comments

@mkrappitz
Copy link

When using a custom fluid backend template with the method setBackendTemplate() (https://github.com/b13/container/blob/master/README.md#methods-of-the-containerconfiguration-object), the content of the custom backend fluid template is being outputted in the page module, but the grid for placing content elements is not being shown. This happened after updating to container 3.1.0 on TYPO3 version 13.4.1. Before we used container version 1 and 2 on TYPO3 version 12 and the same backehnd template had no problems. Is this is a bug or is there a syntax change necessary? The documentation unfortunately says nothing about that topic.

@the-andyman
Copy link

the-andyman commented Dec 3, 2024

I have the same problem.
{tx_container_grid -> f:format.raw()}
no longer displays anything.

@TheSophiaDev
Copy link

I had the same problem and debugged it.

TYPO3 throws a PageContentPreviewRenderingEvent in the typo3/cms-backend/Classes/View/BackendLayout/Grid/GridColumnItem class. If the previewContent variable is not null after the EventListener has been executed, the actual PreviewRenderer (in this case ContainerPreviewRenderer) is no longer executed with the renderPageModulePreviewContent() function. This function is necessary to show the grid content in the backend preview.

TYPO3 itself has an EventListener for this event, namely the typo3/cms-backend/Classes/Preview/FluidBasedContentPreviewRenderer. If a backend template is stored in the TsConfig, it fills the previewContent variable with the content of this template. The setBackendTemplate() function stores the template in the TsConfig. Therefore the variable previewContent of the event is always filled after the execution of the EventListener typo3/cms-backend/Classes/Preview/FluidBasedContentPreviewRenderer if a backend template has been stored and no own PreviewRenderer is executed anymore. My current solution for this problem is also to register an EventListener for the event, which is executed after the FluidBasedContentPreviewRenderer and to execute the ContainerPreviewRenderer with all information.

Maybe this is a solution for you too.

@kauz56
Copy link

kauz56 commented Jan 13, 2025

Also having this issue. It should be noted that this seems to be an incompatibility with TYPO3 13. The same version of container (3.1.1) doesn't have this issue with TYPO3 12.

@achimfritz achimfritz self-assigned this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants