FluidTYPO3 / flux

TYPO3 extension Flux: Dynamic Fluid FlexForms
https://fluidtypo3.org
145 stars 214 forks source link

BUG: Preview section overwrite header content in Backend Page Layout. #2183

Open monosize opened 1 month ago

monosize commented 1 month ago

I have checked that the bug exists in the dev-development branch Yes

I have checked that there are no already open issues or recently closed issues about this bug Yes

Describe the bug If you use the preview section in a page template, the content of the header is completely overwritten. The content of other extensions such as ce_seo is not displayed.

<f:section name="Preview">
...
</f:section>

To Reproduce use a preview section.

Expected behavior

https://github.com/FluidTYPO3/flux/blob/ffa2dce6a586cee367d5ad6c2d6b3660c42826b8/Classes/Integration/Event/ModifyPageLayoutContentEventListener.php#L46

$event->setHeaderContent($previewContent); If other extensions have previously added content to the header, this will now be overwritten. It is better to use $event->addHeaderContent($previewContent);

NamelessCoder commented 1 month ago

Sounds fair enough. Do you think we should add a Form option so people can control whether they want to append or replace, based on options of flux:form in the template?

monosize commented 2 weeks ago

That makes sense. I would see adding as the default. Overwriting can be set explicitly.