Additional uncaught exception thrown while handling exception.
Original
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: The service definition "twig" does not exist. in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 690 of /Users/jlampton/Sites/_drupal/drupal-8.x-twig/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php).
Additional
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: The service definition "twig" does not exist. in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 690 of /Users/jlampton/Sites/_drupal/drupal-8.x-twig/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php).
I ran into this while trying to test theme_task_list, which is used on the update.php page. I had to change the maintenance theme in settings.php to stark, and then BAM. this happened :)
it looks like Twig might not be loaded at this point? is this something we need to worry about if we replace all theme functions with templates? Should we make an exception for stuff in theme.maintenance.inc?
Comments
Comment #1
soulston commentedThats's odd Jen because I was able to switch to use stark as my admin theme and it seemed to render the status report ok, that was on Saturday though so maybe something changed?
Comment #2
jenlamptonNot changing the admin theme, that works fine. This is changing the maintenance theme, which needs to be done by setting a variable in settings.php. The update page uses the maintenance theme, and can't use the admin theme since it runs at a higher bootstrap level, and can't check the database to see what your admin theme is set to.
I just don't think we've thought about this yet :)
Comment #3
soulston commentedAh sorry Jen - misread that.
Comment #4
fabianx commentedI am not sure how we can fix this. We probably need to load Twig in the bootstrap container *brrr*
I think we should leave that templates for now ...
Tentatively assigning to chx.
Comment #5
jenlamptonJust an update that I was able to change the maintenance theme to stark today with fewer issues. Still working on task list, but so far so good. Fingers crossed!
Comment #6
alexrayu commentedCould not reproduce on current Front End branch.
Comment #7
artofeclipse commentedI'm not sure if it's related or not I was about to test my patch on of twig conversion issues #1939104: Convert theme_html_tag() to Twig and I faced this error, the test fail at the installation stage, my patch works fine after the installation and fails if I apply it before the installation, maybe I missed something, not sure.
Comment #8
hefox commentedLooks like there is an install time issue with twig that breaks install.php if any twig rendered item is called before settings.php is verified (e.g. when $install_state['settings_verified'] is false) because it's not registered yet, producing this error. Outside of install, this would likely also occur if twig rendered item is called before registerTwig is called by CoreBundle (if anything does call theme pre that). This blocks converting some items to use twig as can't install
See http://drupal.org/node/1939104#comment-7212566
Comment #9
hefox commentedInstall time issue fixed via #1942490: Make Twig engine available during install
Comment #10
chx commented