-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed: Install fails when using the dynamic config folder paths. #6499
Comments
Confirmed. When using the dynamic directory names, the install via UI fails. In my case it was:
vs. created directory (wrong!):
👆 One is the md5 of the initial database value Seems like this md5 based directory creation happened too early, when the database credentials weren't even set yet? |
Thanks @yorkshire-pudding and @indigoxela. Could you try out backdrop/backdrop#4724? I haven't reproduced this problem locally, but I suspect it has to do with initializing config before settings.php is rewritten. The PR moves the initialization of the config after rewriting settings.php. |
@quicksketch - I tested with that but it doesn't make any difference. I get exactly the same results. |
@quicksketch @yorkshire-pudding It worked for me. I first tested a fresh install without the patch and I got:
Then I applied the patch and got "Backdrop installed successfully." And I was able to log in. All looked fine. |
For me, that patch (b50117cb42f0d156ab16161dc0d12a9a3b1e6c8b) helps a little bit - but not decisively. One thing to look out for in reproducing (when repeatedly reinstalling) -- the content of for trial in 1 2 ; do
reset_mysql_databases
git checkout settings.php
rm -rf files/config_*
./core/scripts/install.sh --db-url=...
done Compare:
Asides:
|
@totten If you get a chance to test removing the backdrop/backdrop@5faa5ed#diff-5ad946c2d6abff202fe58bbc7b2b8c28af243b335436bdcf6948ca183cb46290 |
Thanks @totten, I appreciate your help! I pushed another commit to the PR that might resolve the problem more comprehensively. In my testing I was able to install manually and have the settings.php file rewritten correctly and be picked up in the remainder of the installer.
Yep, I think that's where we're seeing the problem. I don't usually run into this issue because DDEV always provides the database connection string, so that step of the installer is skipped. When using the UI and using the stock settings.php file, it rewrites its contents based on the input from the UI. So the first install fails, but it populates some values in settings.php. The next time, those values are provided and don't need to be changed, so the second install works properly. I think the updated PR is now working properly, please give it a test if you can. |
Oh, nice. Thanks @laryn @quicksketch. I think either/both get it to work for me:
|
Thanks for testing @totten! With @herbdool's confirmation, I went ahead and merged backdrop/backdrop#4724 to make testing easier. I'm feeling pretty good that this change reduces the logical differences in the installer code from what we have in 1.27.x. @yorkshire-pudding If the problem is still yet occurring for you; it's possible there's another problem at play here still, but it looks as though this change has fixed at least one scenario. Please reopen if you still can reproduce the issue with the latest 1.x. |
Fantastic! I can confirm, that the latest commit fixes the installer. 👍 |
I see this has all been sorted while I was out and then asleep. I've tested and confirm it all works. |
Just for my benefit (because I've seen similar errors before), this was introduced in 1.28.x, right? (assuming with the changes for #2277) ...it wasn't reproducible before, in 1.27.x. Was it? |
Yes. That is correct |
Hello is this supposed to be fixed in 1.29.0? I tried to update the Dockerfile with 1.29.0 release and I am running at the same issue. The folks at backdrop-ops/backdrop-docker#48 have been crying about it for 4 years. Trying to decide if this project is still alive or abandoned. |
@diraneyya - this was an issue found when the config database storage functionality was added, but it was fixed in this issue before the 1.28.0 was released |
@diraneyya - I've raised a question in the chat channel at https://backdrop.zulipchat.com/#narrow/stream/218635-Backdrop/topic/Docker.20Image |
Thank you for the response I updated the docker image and it indeed works now: I also uploaded a multi-arch build to docker hub: Thanks! |
Description of the bug
Trying to install in the default way with dynamically generated config folder names fails as the config folder name is not written to
settings.php
Steps To Reproduce
To reproduce the behavior:
cd docroot
./core/scripts/install.sh --account-pass=password --db-url=mysql://db_user:db_pass@localhost/db_name
(anonymised)Backdrop installed successfully.
head -n 60 settings.php
ls files
core/install.php
ls files
head -n 60 settings.php
Actual behavior
Step 7 - Extract of settings.php
Note the
$database
settings have been written tosettings.php
but not$config_directories
Step 8
Step 9
Note the difference in config folder names between folder and error message:
Error:
config_b05ed1b853e0ec5082777affc41f2cae
Folder:
config_a1614e81308b9e6b86be181ef0914335
Step 13
Step 14
Note the difference in config folder names between folder and error message:
Error:
config_40a3365ba6fb24dd6f483b4734a29085
Folder:
config_a1614e81308b9e6b86be181ef0914335
Step 15 - Extract of settings.php
Note the
$database
settings have been written tosettings.php
but not$config_directories
Expected behavior
Backdrop installs normally using both the CLI script and the UI
Confirmed in both Lando and natively (on host) that the latest release 1.27.1 works fine for both.
Additional information
Add any other information that could help, such as:
The text was updated successfully, but these errors were encountered: