new \AppBundle\AppBundle(),
new Sulu\Bundle\ThemeBundle\SuluThemeBundle(),
new Liip\ThemeBundle\LiipThemeBundle(),
DefaultController:
class DefaultController extends Controller
{
public function indexAction()
{
$webspace = $this->get('sulu_core.webspace.request_analyzer')->getWebspace();
die($webspace->getTheme());
}
}
YourNewShinyThemeController:
class YourNewShinyThemeController extends Controller
{
public function indexAction()
{
die('YourNewShinyThemeController');
}
}
The result is that i will always end up in the DefaultController. However, the “die($webspace->getTheme());” prints the text: “your-new-shiny-theme”.
Actual Behavior
When using the "Theme Specific Controllers" feature the correct controller is not being used based on the webspace theme.
Expected Behavior
When using the "Theme Specific Controllers" feature the correct controller is being used based on the webspace theme.
Steps to Reproduce
I created a new project from scratch with just the following setup:
Webspace 1:
Webspace 2:
Config.yml:
Routing.yml:
AbstractKernel:
DefaultController:
YourNewShinyThemeController:
The result is that i will always end up in the DefaultController. However, the “die($webspace->getTheme());” prints the text: “your-new-shiny-theme”.
Possible Solutions
As @alexander-schranz mentioned in the slack channel: maybe there is a problem with kernel.request priority: https://github.com/sulu/SuluThemeBundle/blob/1.3.2/Resources/config/website.xml#L11