sulu / SuluThemeBundle

MIT License
18 stars 15 forks source link

Blank preview page in admin section while using SuluThemeBundle and malconfigured webspace.xml #15

Closed svenbartak closed 4 months ago

svenbartak commented 6 years ago
Q A
Bug? possible
New Feature? no
Sulu Version 1.5.x and 1.6.x
Browser Version No relevance

Actual Behavior

If you use the SuluThemeBundle and you forget to configure all webspace.xml with the <theme>tbd</theme> tag, the preview component in the admin area will only show a blank page.

Expected Behavior

Showing the preview of the page and use the default theme configured in the app/config/config.yml when forgot the theme tag.

Steps to Reproduce

Integrate the SuluThemeBundle using this article http://docs.sulu.io/en/latest/book/themes.html and create two webspace (e.g. a.xml and b.xml). Configure the webspace a.xml with theme tag and webspace b.xml without the theme tag.

Using the webspace b in the admin area will show a blank page in the preview.

Possible Solutions

Probably using the default theme configured in the app/config/config.yml

alexander-schranz commented 6 years ago

@svenbartak thank you for your issue.

I think the error is here in the Themebundle at: https://github.com/sulu/SuluThemeBundle/blob/476070bb776fe1b4e0a456ea3005b8fb5c6eb930/EventListener/SetThemeEventListener.php#L60

Think it should not call setTheme when the theme is empty like the function above. Can you test that? And maybe create a PR in the theme bundle repo?

danrot commented 4 years ago

Since this seems to be an issue with the ThemeBundle I am going to transfer it.

alexander-schranz commented 4 months ago

Looks like this was fixed in 3.0.1