Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
install system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Feb 2013 at 10:35 UTC
Updated:
14 Jul 2015 at 06:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tkitchin commentedEvent summary:
In short, the original error during DrupalKernel initialisation is concealed by an error during the maintenance mode setup (although it only happens if we got there via an exception rather than, say, running the installer). I'm working on resolving this by bootstrapping the drupal_container as part of the maintenance theme bootstrapping.
Comment #2
tkitchin commentedPatch to implement a
MaintenanceContainerBuilderwhich can also be used in the installer bootstrap (see todo at: http://drupalcode.org/project/drupal.git/blob/HEAD:/core/includes/instal...), and uses it there and in the maintenance mode bootstrap when a pre-kernel-boot exception sends us there. Also sets the pre-kernel-boot exception handler to render the Response object if it generates one, as previously it wasn't actually using it for anything thus causing a WSOD in any exception handled by it.Comment #3
tkitchin commentedComment #5
stevesmename commentedSame error happened for me (same commit), I had instead setup a settings.php config file (copied from default.settings.php), I entered in my new database details and as the original post I had my database emptied. I expected Drupal to install similar to D7 but received same error described in original post.
Comment #6
tkitchin commentedTest failures from the previous patch were due to the patch replacing an existing container if one existed. This patch checks that there isn't already a container before bootstrapping a minimal one.
Comment #7
tkitchin commentedAdded some documentation. Also slight rename to better fit naming guidelines.
Comment #8
tkitchin commentedFixed some minor code style issues.
Comment #9
damienmckennaRelated: #1895100: Remove pre-existing compiled PHP code when re-installing Drupal core
Comment #10
damienmckennaThe error still happens after applying the patch.
Comment #11
damienmckennaWith the scenario described in the main issue the following error is displayed on the homepage after the database is purged:
Fatal error: Class 'Drupal\rest\EventSubscriber\RouteSubscriber' not found in core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php on line 142I started the installer (install.php), was able to select the language and profile, it verified the requirements, found the old settings.php file with the database configuration files, as it was running the "installation profile" step of the installer it fails with the error described in the issue summary:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://d8.dev/core/install.php?langcode=en&profile=standard&id=1&op=do_nojs&op=do StatusText: OK ResponseText: Fatal error: Call to a member function get() on a non-object in core/modules/views/lib/Drupal/views/ViewStorageController.php on line 26Comment #12
sunPlease note that this issue does not talk about install.php.
This issue is about visiting the actual site (index.php) after dropping the database.
Therefore, all of the changes to install.inc should be reverted and removed from this patch.
Due to that, #11 sounds unrelated too, but I'm not 100% clear on that.
Comment #13
tkitchin commentedThanks for the comments. This patch is the same minus the changes to install.core.inc - I was mostly fixing it in passing since the install.core.inc code has a @todo suggesting pulling the code out, and the requirements for the container at that point are essentially identical as far as I can see. You're right, though - not actually related to the issue, so shouldn't happen here. Apologies for the scope creep, there.
Re: #11, I haven't been able to reproduce that, I'm afraid. I'm testing with a fresh d8 deployment, no additional modules activated or configuration changed.
Comment #14
tkitchin commentedComment #16
damienmckenna@sun: Would you recommend merging problems during the installation process into #1895100: Remove pre-existing compiled PHP code when re-installing Drupal core or adding a new issue?
Comment #17
tkitchin commented#13: drupal-maintenance-bootstrap-1908310-13.patch queued for re-testing.
Comment #18
damienmckennaThe patch from #13 rerolled, and I fixed some whitespace errors that git-apply reported.
Comment #19
damienmckennaAck, the last patch missed MaintenanceContainerBuilder.php.
Comment #20
damienmckennaThe patch in #19 does not always do what is described.
These scenarios all have the patch from #19 applied.
Scenario #1: Tables removed.
Scenario #2: Database removed.
Scenario #3: Tables removed and compiled PHP files removed.
Comment #21
damienmckennaI split up the config() function from \Drupal\Core\Config\Config to the following:
The error then pointed to the second line, meaning that the value returned from drupal_container() is invalid.
Comment #22
damienmckennaThe documentation for drupal_container() says:
So, does this class need to be updated to a new structure before anything else should proceed?
Comment #23
damienmckennaTag.
Comment #24
damienmckennaThis is related to #1875086: Improve DX of drupal_container()->get().
Comment #25
alexpottThis patch changes the direction slightly and move responsibility to the error handling system to ensure it has enough of a container to function properly.
Without this patch

With this patch

I believe this is release blocking as the current message when the db is not available is very very obscure.
Comment #26
swentel commentedInteresting - shouldn't we then also remove that line in index.php ? That one is just completely not informative :)
Comment #27
rivimeyIn reviewing this issue I am using D8 from git as of 21:35 on 11-Dec, #51560a3a0424
First, without applying a patch:
-Creating a default site and then dropping the tables in the database using drush sql-drop results in the following message on an otherwise white browser screen:
If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild- Creating a default site and then dropping the database completely results in the same message.
I applied the patch from #25, which succeeds with an offset of 10 lines to one of the two files, and recreated the site.
Dropping the tables as before now returns a similar screen to that shown in #25, but it's not the same. In particular, the Drupal logo and 'please try again' messages are missing. However the central error is present and moderately clear. A screenshot is attached.
Probably RTBC but curious about the logo so not changing status.
Comment #28
rivimeyRerolled the patch from #25, git diff, otherwise unchanged.
Comment #29
steinmb commentedPHP 5.5.5
MariaDB 5.5.32
Drupal 8.x HEAD
Database stopped
before
after #28
All tables dropped
before
after #28
Comment #30
steinmb commentedRef. #29. No end users get this.
Comment #31
sunI fixed the error and exception handling in the installer very recently. In case of an error, you should see a verbose backtrace now.
Can you test again with latest 8.x/HEAD, please?
Comment #32
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 #33
catchNow fixed. We could do without the literally printed html tags in the exception message, but that's minor.
Comment #34
sunFiled #2194533: "Drupal is already installed" exception is printed like any other exception for that
Comment #35
naim commentedthis is still an issue in drupal-8.0.0-beta12
How should I wipe and reinstall drupal to avoid this?