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

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

Open
monosize opened this issue Oct 20, 2024 · 2 comments
Open

Comments

@monosize
Copy link
Member

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

$event->setHeaderContent($previewContent);

$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
Copy link
Member

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
Copy link
Member Author

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

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

2 participants