Problem/Motivation

Just tried logging into D8 core and received this. I was on home and used the sidebar login. This issue does not appear on /user/login url!

Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break.") in "core/themes/bartik/templates/page.html.twig" at line 148. in Twig_Template->displayWithErrorHandling() (line 328 of core\vendor\twig\twig\lib\Twig\Template.php). 

The url node?destination=/drupal8/node is the one I see after the submit.

The login form also has a reCAPTCHA attached - just for completeness.

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

hass’s picture

Issue summary: View changes
Cottser’s picture

I think we need more information, it sounds like some other code is involved or we're missing some steps to reproduce. Please test with 8.0.x as well. Thanks!

hass’s picture

You only need CAPTCHA 8.x-1.x-dev and reCAPTCHA 8.x-2.x-dev - both latest DEV versions. Assign reCAPTCHA to user_login_form and try to login via the sidebar with an invalid username and password. After you press login you will get the error.

If you need to know anything else, please ask for what.

hass’s picture

I found one more example. Just add drupal_process_attached($page); with an undefined $page anywhere you want.

bill richardson’s picture

Do not have this issue with core install ( beta 10 ) , OR when i add captcha ---- recaptcha was updated on 8 th may, so that may solve the error that you where getting.
If issue not solved - you will need to inform recapcha maintainer.

hass’s picture

I'm the recaptcha maintainer.

Cottser’s picture

Version: 8.0.0-beta10 » 8.0.x-dev
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs tests

@hass I can't reproduce this based on the steps you provided, on either 8.0.0-beta10 or 8.0.x.

Can you please provide a minimal code example/module that demonstrates this reported bug or provide working steps to reproduce?

Thanks.

bird-cage’s picture

I get the exact same error, but only in FireFox! I'm on a windows machine with FF developer edition. In Chrome and IE 11, login works as expected. That is no error. Only in FireFox the error, drupal returns a 403 Forbidden and the login fails.

UPDATE: correction:

  • I've just seen the error is not dependant on Browser, but comes only with anonymous user on any page in any browser except /user/login
  • In Firefox login fails for reasons I don't as yet know. This would be a separate bug.

We have no capture modules installed, in fact other than core and a bunch of custom modules for content types and entities, it's a very clean install.

Here the error copied from the browser:

Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break.") in "core/themes/bartik/templates/page.html.twig" at line 148. in Twig_Template->displayWithErrorHandling() (line 328 of core\vendor\twig\twig\lib\Twig\Template.php). 
cparrish817’s picture

http://drupal8.dev/user/login
I'm getting it even on /usr/login. Was working fine until ran a git pull not I'm not sure if I should go forwards or backwards

pivica’s picture

Just got a similar error

Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break.") in "profiles/np8/themes/np8_base_theme/templates/block.html.twig" at line 51. in Twig_Template->displayBlock() (line 158 of core/vendor/twig/twig/lib/Twig/Template.php).

Not very helpful error but figure it out what I was doing wrong. In custom module I added hook_views_pre_build(ViewExecutable $view) implementation but forgot to add use \Drupal\views\ViewExecutable - after adding use statement error disappeared.

No idea how this is related but maybe it will help somebody.

joelpittet’s picture

#10 doesn't seem be related because it's not on the user login, neither does #8 because browser specific shouldn't be producing server side errors.

Closing this as we can't reproduce and it's been 6months since we asked for steps to reproduce this.

Triaging theme system.

joelpittet’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)