{"action":"created","issue":{"url":"https://api.github.com/repos/zikula/core/issues/2844","repository_url":"https://api.github.com/repos/zikula/core","labels_url":"https://api.github.com/repos/zikula/core/issues/2844/labels{/name}","comments_url":"https://api.github.com/repos/zikula/core/issues/2844/comments","events_url":"https://api.github.com/repos/zikula/core/issues/2844/events","html_url":"https://github.com/zikula/core/issues/2844","id":147209931,"number":2844,"title":"ContextErrorException in Engine.php line 340: Warning: Invalid argument supplied for foreach() in Engine.php line 340","user":{"login":"rallek","id":935250,"avatar_url":"https://avatars.githubusercontent.com/u/935250?v=3","gravatar_id":"","url":"https://api.github.com/users/rallek","html_url":"https://github.com/rallek","followers_url":"https://api.github.com/users/rallek/followers","following_url":"https://api.github.com/users/rallek/following{/other_user}","gists_url":"https://api.github.com/users/rallek/gists{/gist_id}","starred_url":"https://api.github.com/users/rallek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallek/subscriptions","organizations_url":"https://api.github.com/users/rallek/orgs","repos_url":"https://api.github.com/users/rallek/repos","events_url":"https://api.github.com/users/rallek/events{/privacy}","received_events_url":"https://api.github.com/users/rallek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-10T09:47:57Z","updated_at":"2016-04-10T17:02:44Z","closed_at":null,"body":"| Q                 | A\r\n| ----------------- | ---\r\n| Zikula Version    | 1.4.2\r\n| PHP Version       | 5.5.30\r\n\r\n### Expected behavior\r\nshowing nor error\r\n\r\n### Actual behavior\r\nhome page is working well but If I go to another page (e.g. site search) I do get the following error:\r\n````\r\nWhoops, looks like something went wrong.\r\n2/2 ContextErrorException in Engine.php line 340: Warning: Invalid argument supplied for foreach()\r\n\r\n    in Engine.php line 340\r\n    at ErrorHandler->handleError('2', 'Invalid argument supplied for foreach()', '/home/www/142.koester123.de/Zikula_Core-1.4.2/system/ThemeModule/Engine/Engine.php', '340', array('themeConfig' => null, 'request' => object(Zikula_Request_Http), 'requestAttributes' => array('_theme' => 'ZikulaOmiTheme', '_controller' => 'Zikula\\RoutesModule\\Controller\\RedirectingController::removeTrailingSlashAction', '_zkBundle' => 'ZikulaRoutesModule', '_zkModule' => 'ZikulaRoutesModule', '_zkType' => 'redirecting', '_zkFunc' => 'removeTrailingSlash', 'url' => 'news/view/page/2/', '_route' => 'zikularoutesmodule_redirecting_removetrailingslash', '_locale' => 'de', '_route_params' => array('_zkBundle' => 'ZikulaRoutesModule', 'url' => 'news/view/page/2/', '_locale' => 'de'), '_legacy' => true), 'lct' => null, 'pathInfo' => '/news/view/page/2/')) in Engine.php line 340\r\n    at Engine->setMatchingRealm() in Engine.php line 222\r\n    at Engine->getRealm() in ZikulaVersionDataCollector.php line 37\r\n    at ZikulaVersionDataCollector->collect(object(Zikula_Request_Http), object(Response), object(ContextErrorException)) in Profiler.php line 218\r\n    at Profiler->collect(object(Zikula_Request_Http), object(Response), object(ContextErrorException)) in ProfilerListener.php line 128\r\n    at ProfilerListener->onKernelResponse(object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher))\r\n    at call_user_func(array(object(ProfilerListener), 'onKernelResponse'), object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) in WrappedListener.php line 61\r\n    at WrappedListener->__invoke(object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher))\r\n    at call_user_func(object(WrappedListener), object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) in WrappedListener.php line 61\r\n    at WrappedListener->__invoke(object(FilterResponseEvent), 'kernel.response', object(Zikula_EventManager))\r\n    at call_user_func(object(WrappedListener), object(FilterResponseEvent), 'kernel.response', object(Zikula_EventManager)) in EventDispatcher.php line 181\r\n    at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.response', object(FilterResponseEvent)) in EventDispatcher.php line 46\r\n    at EventDispatcher->dispatch('kernel.response', object(FilterResponseEvent), null) in EventManager.php line 99\r\n    at Zikula_EventManager->dispatch('kernel.response', object(FilterResponseEvent)) in TraceableEventDispatcher.php line 132\r\n    at TraceableEventDispatcher->dispatch('kernel.response', object(FilterResponseEvent)) in HttpKernel.php line 179\r\n    at HttpKernel->filterResponse(object(Response), object(Zikula_Request_Http), '2') in HttpKernel.php line 161\r\n    at HttpKernel->handleRaw(object(Zikula_Request_Http), '2') in HttpKernel.php line 62\r\n    at HttpKernel->handle(object(Zikula_Request_Http), '2', false) in ContainerAwareHttpKernel.php line 69\r\n    at ContainerAwareHttpKernel->handle(object(Zikula_Request_Http), '2', false) in ExceptionListener.php line 50\r\n    at ExceptionListener->onKernelException(object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))\r\n    at call_user_func(array(object(ExceptionListener), 'onKernelException'), object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) in WrappedListener.php line 61\r\n    at WrappedListener->__invoke(object(GetResponseForExceptionEvent), 'kernel.exception', object(Zikula_EventManager))\r\n    at call_user_func(object(WrappedListener), object(GetResponseForExceptionEvent), 'kernel.exception', object(Zikula_EventManager)) in EventDispatcher.php line 181\r\n    at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(GetResponseForExceptionEvent)) in EventDispatcher.php line 46\r\n    at EventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent), null) in EventManager.php line 99\r\n    at Zikula_EventManager->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) in TraceableEventDispatcher.php line 132\r\n    at TraceableEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) in HttpKernel.php line 216\r\n    at HttpKernel->handleException(object(ContextErrorException), object(Zikula_Request_Http), '1') in HttpKernel.php line 70\r\n    at HttpKernel->handle(object(Zikula_Request_Http), '1', true) in ContainerAwareHttpKernel.php line 69\r\n    at ContainerAwareHttpKernel->handle(object(Zikula_Request_Http), '1', true) in Kernel.php line 185\r\n    at Kernel->handle(object(Zikula_Request_Http)) in index.php line 25\r\n\r\n1/2 ContextErrorException in Engine.php line 340: Warning: Invalid argument supplied for foreach()\r\n\r\n    in Engine.php line 340\r\n    at ErrorHandler->handleError('2', 'Invalid argument supplied for foreach()', '/home/www/142.koester123.de/Zikula_Core-1.4.2/system/ThemeModule/Engine/Engine.php', '340', array('themeConfig' => null, 'request' => object(Zikula_Request_Http), 'requestAttributes' => array('_theme' => 'ZikulaOmiTheme', '_controller' => 'Zikula\\RoutesModule\\Controller\\RedirectingController::removeTrailingSlashAction', '_zkBundle' => 'ZikulaRoutesModule', '_zkModule' => 'ZikulaRoutesModule', '_zkType' => 'redirecting', '_zkFunc' => 'removeTrailingSlash', 'url' => 'news/view/page/2/', '_route' => 'zikularoutesmodule_redirecting_removetrailingslash', '_locale' => 'de', '_route_params' => array('_zkBundle' => 'ZikulaRoutesModule', 'url' => 'news/view/page/2/', '_locale' => 'de')), 'lct' => null, 'pathInfo' => '/news/view/page/2/')) in Engine.php line 340\r\n    at Engine->setMatchingRealm() in Engine.php line 222\r\n    at Engine->getRealm() in ZikulaVersionDataCollector.php line 37\r\n    at ZikulaVersionDataCollector->collect(object(Zikula_Request_Http), object(RedirectResponse), null) in Profiler.php line 218\r\n    at Profiler->collect(object(Zikula_Request_Http), object(RedirectResponse), null) in ProfilerListener.php line 128\r\n    at ProfilerListener->onKernelResponse(object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher))\r\n    at call_user_func(array(object(ProfilerListener), 'onKernelResponse'), object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) in WrappedListener.php line 61\r\n    at WrappedListener->__invoke(object(FilterResponseEvent), 'kernel.response', object(Zikula_EventManager))\r\n    at call_user_func(object(WrappedListener), object(FilterResponseEvent), 'kernel.response', object(Zikula_EventManager)) in EventDispatcher.php line 181\r\n    at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.response', object(FilterResponseEvent)) in EventDispatcher.php line 46\r\n    at EventDispatcher->dispatch('kernel.response', object(FilterResponseEvent), null) in EventManager.php line 99\r\n    at Zikula_EventManager->dispatch('kernel.response', object(FilterResponseEvent)) in TraceableEventDispatcher.php line 132\r\n    at TraceableEventDispatcher->dispatch('kernel.response', object(FilterResponseEvent)) in HttpKernel.php line 179\r\n    at HttpKernel->filterResponse(object(RedirectResponse), object(Zikula_Request_Http), '1') in HttpKernel.php line 161\r\n    at HttpKernel->handleRaw(object(Zikula_Request_Http), '1') in HttpKernel.php line 62\r\n    at HttpKernel->handle(object(Zikula_Request_Http), '1', true) in ContainerAwareHttpKernel.php line 69\r\n    at ContainerAwareHttpKernel->handle(object(Zikula_Request_Http), '1', true) in Kernel.php line 185\r\n    at Kernel->handle(object(Zikula_Request_Http)) in index.php line 25\r\n\r\n````\r\nI am not shure if it is an core issue or somethinng special for me.\r\n\r\nI tried to upgrade my site from 1.4.0 to 1.4.2 with no success (see my ticket). Unfortuately my database dump file was corupt. The upgrade changed already several thing in the database so I can not simply switch back. I decided to setup a new 1.4.2 site and move the database content of news, hooks, categories and so on to the new site. This is working fine so far. But picture of my theme are not shown on e.g. the site search page but on the home page.\r\nThis picture is a background picture:\r\n````\r\n<header class=\"intro-header\" style=\"background-image: url('themes/Zikula/Theme/OmiTheme/Resources/public/images/omi.jpg')\">\r\n````\r\nThe theme is based on boostrap theme from zikula 1.4.1. The header definition is located in the file ``OmiTheme\\Resources\\views\\includes\\intro_header.tpl``\r\n\r\nIf I switch dev mode and debug off. the page is working but the picture is missing.\r\n\r\ndeleting ``/prod`` or ``/debug`` and reloading routes do not do the trick.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zikula/core/issues/comments/208015777","html_url":"https://github.com/zikula/core/issues/2844#issuecomment-208015777","issue_url":"https://api.github.com/repos/zikula/core/issues/2844","id":208015777,"user":{"login":"craigh","id":350048,"avatar_url":"https://avatars.githubusercontent.com/u/350048?v=3","gravatar_id":"","url":"https://api.github.com/users/craigh","html_url":"https://github.com/craigh","followers_url":"https://api.github.com/users/craigh/followers","following_url":"https://api.github.com/users/craigh/following{/other_user}","gists_url":"https://api.github.com/users/craigh/gists{/gist_id}","starred_url":"https://api.github.com/users/craigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigh/subscriptions","organizations_url":"https://api.github.com/users/craigh/orgs","repos_url":"https://api.github.com/users/craigh/repos","events_url":"https://api.github.com/users/craigh/events{/privacy}","received_events_url":"https://api.github.com/users/craigh/received_events","type":"User","site_admin":false},"created_at":"2016-04-10T17:02:44Z","updated_at":"2016-04-10T17:02:44Z","body":"zip up your theme and attach to this ticket."}}