ThemeManager fails when removing a theme

Description

Steps to reproduce

  • Add a theme to your Integrated installation

  • Assign the theme to a website

  • Add a page to the website

  • Remove the theme from your Integrated installation

  • Result: exception on all pages of the channel. In this case the default theme should be used automatically

InvalidArgumentException in ThemeManager.php line 122:
Theme "thompson" not exists.
in ThemeManager.php line 122
at ThemeManager->setActiveTheme('thompson') in WebsiteConfigurationListener.php line 91
at WebsiteConfigurationListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
at call_user_func(array(object(WebsiteConfigurationListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) in WrappedListener.php line 61
at WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))
at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) in WrappedListener.php line 61
at WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher))

Requirements

  • Removing a theme or removing a base view from a theme shouldn't throw an exception, but should fallback to the default theme, default base view

  • Don't store the full path of a view, so changing a theme should affect all pages automatically

Technical tasks

None

Deployment actions

None

Assignee

Unassigned

External issue ID

None

Client

Integrated Marijn

Min. hours

None

Dev hour estimate

None

Epic Link

Sprint

None

Fix versions

Configure