Followup of #1951068: install.php error reporting is broken
When Drupal is already installed, and someone tries to run install.php, it outputs list of suggestions.
This list doesn't contain description of how to re-install Drupal, using existing settings.php.
The closest item is
To start over, you must empty your existing database, delete your active configuration, and copy default.settings.php over settings.php
This item should be changed to explain that it is possible to use existing settings.php (removing active configuration variables)
Comment | File | Size | Author |
---|---|---|---|
#26 | interdiff-1963760-21-26.txt | 980 bytes | amitgoyal |
#26 | update-install-php-to-give-proper-info-1963760-26.patch | 1.54 KB | amitgoyal |
Comments
Comment #1
xjmComment #2
mgiffordThis would be good.
Comment #3
rteijeiro CreditAttribution: rteijeiro commentedI managed to reinstall following this steps:
- Deleted the drupal8 database.
- Deleted all the files and directories in /sites/default/files
- And changed the settings.php file permissions to 775.
- Run the install.php again and run.
Are this steps valid?
I can create the patch if you agree with this solution.
Comment #4
valthebald#3: maybe that depends on environment, I also had to remove all mentions of active configuration from settings.php
Comment #5
rteijeiro CreditAttribution: rteijeiro commentedSo valthebald, it is almost the same that override the settings.php with a new copy from default.settings.php, isn't it?
Comment #6
valthebaldnot exactly.
default.settings.php does not contain connection string to your database, existing settings.php does
Comment #7
xjmFor this screen, we should keep the text simple. See #1951068: install.php error reporting is broken #67 and #68.
Comment #8
rteijeiro CreditAttribution: rteijeiro commentedI agree with xjm, but the second point relates to install to a different database so I guess it's better to place that in the first point that relates to start over.
Comment #9
jenlamptonIn Durpal 7 when there was already a settings.php file and you ran the installer, it would simply skip the step where it asked you for db credentials. I'd love to get d8 to this same point so we don't have any regression.
This may mean we need to locate the settings variables that were changed on the initial install and overwrite them with the values for the new install, but I don't see why we can't do that.
Let's not solve this problem with more documentation, let's actually solve the problem please :)
Comment #10
xjm#9 is actually a very sane course of action, though we would have to decide what to do about a config directory where the active or staging directories were not empty. Maybe list it as one of the things to fix on the checklist dealy?
Comment #11
pwolanin CreditAttribution: pwolanin commentedI think this is a bug/regression. It's pretty important not to have to write the settings.php out in some cases.
Comment #12
jhodgdon+1000 on #9. That you can't do this in d8 is a regression IMO. Saves a bunch of time.
See also
#2083733: Add instructions for reinstall to INSTALL.txt
The current situation is really not helpful. I mean if I do everything I"m supposed to (clean out db, clean out sites/default/files) but forget to make a new blank settings.php copied from default.settings.php, I get that not-at-all helpful message. What if I'm on a plane and don't have internet access?
Comment #13
pwolanin CreditAttribution: pwolanin commentedthis is a bug.
Comment #14
sunHm. The original purpose of this issue (on-screen help) was changed to a different purpose in #9 (fixing re-installation with existing settings.php).
When I encountered the currently existing bug/regression, I noticed this existing issue, but only read the summary and first comments, and thus concluded that it has a different purpose.
I'm currently working on a fix for the bug referenced in #9 over in #2155701: Installer starts with fatal error/exception "table 'semaphore' not found" if settings.php contains $databases already
In turn, it appears to make sense to revert this issue to its original purpose, but leaving that decision to you guys. :)
Comment #15
jhodgdonWell, let's postpone this one until that other one is finished then. Meanwhile, changing title again.
Comment #16
sunComment #17
moshe weitzman CreditAttribution: moshe weitzman commentedAlso, you don't have to 'delete your active configuration' anymore as thats in the DB.
Comment #18
valthebaldComment #19
fnuppy CreditAttribution: fnuppy commentedFirst attempt.
Comment #20
jhodgdonThanks for the patch! However:
This actually doesn't make sense to me -- from this text, I do not know what I really need to do or how to do it.
And see #17 - since config is usually stored in the database now, you probably do not need to remove it in most cases.
Comment #21
amitgoyal CreditAttribution: amitgoyal commentedLooks like original text is good enough and we just need to remove "delete your active configuration" as per #17.
Please review.
Comment #22
mgiffordWhy did you introduce this change?
Comment #23
jhodgdonmgifford: @key inside t() or format_string() means "run this through check_plain()". URLs should not be run through check_plain, they should be inserted as-is, which is why ! is more appropriate.
Comment #24
jhodgdonAfter this patch, the instructions are still talking about finding the active configuration in the bullet list.
Also:
What does this mean actually? What is it trying to accomplish, since the previous instruction told them to copy default.settings.php anyway? I am not sure you can install with the database information already filled in in settings.php at all.
Also... Can someone please try those instructions and see if they are sufficient to allow reinstalling, or if more things need to be deleted?
Comment #25
mgifford@jhodgdon - thanks. I just had noticed it wasn't in the previous patch and didn't think the thread mentioned that it had been added to the latest patch.
Comment #26
amitgoyal CreditAttribution: amitgoyal commentedLooks like we don't really need those extra lines. Please review updated patch.
I have successfully tried re-installing Drupal 8 by emptying my database and by copying default.settings.php to settings.php.
Comment #27
jhodgdonI think this looks good! I'll mark it RTBC and we can see if anyone else disagrees with its accuracy or wording (probably best not to commit it for a few days until people have had a chance to comment).
Comment #28
BiigNiick CreditAttribution: BiigNiick commentedi tested the patch #26 on the latest release. works very well.
-nick
Comment #29
alexpottCommitted 2983bfe and pushed to 8.x. Thanks!