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

Activity

Show:
API
April 24, 2017, 10:39 AM

.Schatting van 4.75 uur is geaccepteerd door Integrated Marijn (in opdracht ingevoerd door Marijn Otte).

Koen Prins
May 3, 2017, 9:11 AM

You'll have merge it yourself

API
May 4, 2017, 9:33 AM

.Notificatie preview gestuurd naar Integrated Marijn (marijn@e-active.nl)

Marijn Otte
May 5, 2017, 12:48 PM

Please keep supporting upgraded 0.6 installations, to avoid the need of migrations/deployment actions.

So please support a full template path in locateTemplate when inserted.

Assignee

Unassigned

External issue ID

None

Client

Integrated Marijn

Min. hours

None

Dev hour estimate

None

Epic Link

Sprint

None

Fix versions

Configure