A fresh download of D8 will fail on install.php.

This is happening because twig is trying to cache classes to the files folder, but the files folder might not be writable or exist yet.

To fix this, we checked if MAINTENANCE_MODE == install, twig_cache = FALSE in registerTwig

https://gist.github.com/joelpittet/5646257

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet’s picture

Status: Active » Needs review
FileSize
789 bytes

Real patch from gist above.

Jon Pugh’s picture

Issue tags: +Quick fix

So, there were a few approaches discussed for this....

If we can get

settings()->get('twig_cache', TRUE)

to return FALSE in install_drupal(), this will be fixed...

however we can't figure out where we could "set" this setting ...

Jon Pugh’s picture

Reroll with some improved comments.

Jon Pugh’s picture

Another reroll

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

This is good to go.... testbot can't test this so +1 for committing asap.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Fiew! :-)

Jon Pugh’s picture

Wooot! first core commit credit!

THANKS!

ParisLiakos’s picture

Use of undefined constant MAINTENANCE_MODE - assumed MAINTENANCE_MODE
in 'Drupal\Core\CoreBundle::registerTwig()

and kills the entire Drupal (due to our sensitive error logging)

after pulling nothing loads, but update.php and install.php

i guess HEAD will break on this patch

ParisLiakos’s picture

Title: twig_cache must be FALSE in install.php registerTwig because we don't know if files folder is writable yet. » {HEAD BROKEN] twig_cache must be FALSE in install.php registerTwig because we don't know if files folder is writable yet.
Status: Fixed » Active

actually it is broken already

chx’s picture

Status: Active » Needs review
FileSize
1.15 KB
chx’s picture

FileSize
829 bytes

minus whitesapce

cweagans’s picture

Status: Needs review » Reviewed & tested by the community

I just tested install and things are working okay. RTBC unless testbot disagrees.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I hang my head in shame...

Committed 94e3e87 and pushed to 8.x. Thanks!

ParisLiakos’s picture

Title: {HEAD BROKEN] twig_cache must be FALSE in install.php registerTwig because we don't know if files folder is writable yet. » twig_cache must be FALSE in install.php registerTwig because we don't know if files folder is writable yet.
joelpittet’s picture

Issue tags: -Quick fix

Thanks everybody and thanks @chx. Didn't realize that the cli install was not treated the same as the UI one.
Sorry for breaking the install and again thank you for the quick fix and double quick commits and @Jon Pugh for helping me with this patch. Friendly user warnings for directory permissions are back as they were!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.