I'm running a fresh checkout of the latest 8.x-dev
I'm using MAMP 2.0.2 (upgraded from previous versions of MAMP) and experienced the following problems both with PHP 5.2.30 and 5.4.10.
When I visit install.php on my localhost, I am redirected to /core/install.php and get the following error:
Additional uncaught exception thrown while handling exception.
Original
Drupal\Core\Config\StorageException: Missing configuration file: system.theme.global in Drupal\Core\Config\InstallStorage->getFilePath() (line 54 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/InstallStorage.php).
Additional
Drupal\Core\Config\StorageException: Missing configuration file: system.site in Drupal\Core\Config\InstallStorage->getFilePath() (line 54 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/InstallStorage.php).
I've done a lot of research trying to find out what could cause this, and eliminated a few PHP settings.
safe_mode is not the problem, as per: https://drupal.org/node/1959062
open_basedir is not the problem, as per: https://drupal.org/node/2019911
I suspect there is another undocumented PHP setting that is causing this error since it seems to be a problem in Russia and China and perhaps these people are using non-standard PHP configurations? Unfortunately, it also comes up for me, and I'm using MAMP.
If anyone has any idea what setting could be causing this issue, can we please document it, update the installer to detect an incorrect setting, and also add the requreiment to the list of Drupal 8 requirements?
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | drupal8.install-fatal.21.patch | 9.22 KB | sun |
| #18 | 2096741.18.patch | 1.84 KB | alexpott |
| #9 | 2096741.9.patch | 463 bytes | alexpott |
| #7 | 2-7-interdiff.txt | 559 bytes | alexpott |
| #7 | 2096741.7.patch | 1.41 KB | alexpott |
Comments
Comment #1
quicksketchI was looking into this on @jenlampton's laptop and it doesn't seem to be related to a setting in PHP. It seems like a bug in Drupal\Core\SystemListing::scan().
There's this section of code in scan():
The call to $this->profiles() is where things go wrong. If you look at the protected profiles method, it looks like this:
So the method profiles() does nothing but return $this->profiles, and it doesn't even use the single parameter that's passed to the method in the first place? This is really, really weird.
So I think what's happening here is that $this->profiles is both a VARIABLE and a METHOD. This is confusing PHP. When you say $this->profiles, it doesn't know what it is. I don't know how it's arriving at this result, but pretty much no matter what you pass into $this->profiles(), it will always return an array with a single value. i.e.
Results in:
So when "modules" is passed in, a search path of "/modules" is returned. The end result is that Drupal can't locate the core modules, which means it can't locate the config files they include, resulting in the error posted by @jenlampton.
Comment #2
quicksketchThis patch doesn't fix what is most likely a bug in the profiles() method. Surely that method is supposed to use the $directory variable that is passed in? But it renames the "profiles" method to "getProfiles", which avoids the PHP confusion and lets Drupal install and function normally.
Comment #3
jenlamptonbumping up priority because I expect this will cause havoc on friday if not resolved :)
Comment #3.0
jenlamptonadd mamp
Comment #4
pingers commentedSystemListing::profiles() was committed from #1831350: Break the circular dependency between bootstrap container and kernel in 6f3268.
Given the method comment, was implementation was never completed (I.e. listing profiles in the current directory).
Comment #5
jenlamptonI'm still experiencing this problem. Though I (and the Russians and Chinese) may be experiencing a strange edge-case bug in PHP, the problem stems to from bad coding practices on our part, and I think we should still clean up Drupal's code.
The patch in #2 fixes the problem and allows me to load the install screen without the exception/exception issue.
Comment #7
alexpottSystemListingInfo overrides the profiles method
Comment #8
alexpottGo testbot go
Comment #9
alexpottI wonder if this works... I can not reproduce
Comment #10
jenlamptonBoth of the above patches do not solve the problem.
Comment #10.0
jenlamptonadded mamp and php versions
Comment #11
chrisjlee commentedI have this issue as well. I had removed the files folder in '/sites/default/files' folder and it resolved the issue.
Comment #12
nerilka commentedI have this issue as well : I'm running wamp 2.2.22, php 5.3.13 and mariadb-5.5.24, the safe_mode is off and the open_basedir is commented. And I tried all the patches ; it failed.
I could install the d8 alpha4 with no issue, but not the d8 alpha5. Both fresh installs.
Comment #13
enhdless commentedI am experiencing this issue on wamp 2.4 with php 5.4.16, and the patches don't fix it for me.
Comment #14
jenlamptonComment #15
jenlamptonJust an update that this problem persists. Alpha 7 now, these are the errors I'm getting:
Additional uncaught exception thrown while handling exception.
Original
Drupal\Core\Config\StorageException: Missing configuration file: system.theme.global in Drupal\Core\Config\InstallStorage->getFilePath() (line 54 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/InstallStorage.php).
Additional
Drupal\Core\Config\StorageException: Missing configuration file: system.site in Drupal\Core\Config\InstallStorage->getFilePath() (line 54 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/InstallStorage.php).
The patch in #2 still solves the problem for me, I'm able to install after changing function names.
The patch in #7 still fails. Perhaps SystemListingInfo should *not* override the profiles (getProfiles) method?
Comment #16
jenlamptonComment #17
jenlamptonError still occurring on latest dev:
Additional uncaught exception thrown while handling exception.
Original
Drupal\Core\Config\StorageException: Missing configuration file: system.theme.global in Drupal\Core\Config\InstallStorage->getFilePath() (line 54 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/InstallStorage.php).
Additional
Drupal\Core\Config\StorageException: Missing configuration file: system.site in Drupal\Core\Config\InstallStorage->getFilePath() (line 54 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/InstallStorage.php).
Patch in #2 still fixes the problem.
Comment #18
alexpottSo I think what's happening is something like this - some exception is occurring somewhere and the theme system is trying to display the error but it can't. Looking at the "fix" in #2 I think the problem must be in
SystemListingInfo::profile()(which is overridingSystemListing::profile()) and hence never called if the patch in #2 is applied.@jenlampton I've tried to add some code to catch whatever is going on in there in the patch attached - if you get debug output if you can pastebin or something - thanks!
Comment #19
alexpottAlso applying #2176105: Installer catches exceptions and manually re-prints them; does not use error/exception handler might shed more light on what is going on.
Comment #20
sun@jenlampton: Heya, some questions:
Comment #21
sunAlternatively, can you try once more with attached patch?
It contains the changes from aforementioned issue + some more error handler fixes.
It also forces the error level to be verbose in the early installer screens, which means that we should get a proper backtrace for the exception that you are seeing. → Given the backtrace, we can figure out where exactly the error is triggered from.
Comment #22
sunNote that the patch in #2194111: Error handler throws exception when service container is not (fully) available yet fixes the last remaining "errors caused by errors" problems. Once that has landed, we should be able to properly debug what's going here.
Comment #23
jenlampton@sun++
@alexpott++
First, sorry I didn't get back to this sooner. The good news is that a fresh checkout of 8.x today ran the installer with no issues. so HOORAY!!!
I'm not sure exactly what the solution was, but I'm very happy I can work on core again with less hassle :) To answer some older questions (which may not be relevant, but I'm doing it anyway)
<3 you both!!
Comment #24
jenlamptonSo, I guess we can mark this issue as duplicate of one of those two... not sure which but I spose it doesn't matter since it's fixed. :) :)