Problem/Motivation
SiteSettingsForm calls functions like drupal_get_database_types() and drupal_install_config_directories(), which are defined in core/includes/install.inc, but that file is not included. It can get away with this on Drupal installation because it's called from install.core.inc, which does include install.inc, but when reusing the form class in another context (specifically, for the database credentials step of the upgrade form for migration) it fails. Attached patch includes install.inc in each method referencing functions defined there - alternatively, we could just include it at the file level...
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #45 | 2272011-45.patch | 3.98 KB | quietone |
| #45 | interdiff-40-45.txt | 1.61 KB | quietone |
Comments
Comment #1
mikeryanProceeding a bit farther with testing, validateForm() actually needs to include install.core.inc since that's where install_database_errors() is defined.
Comment #2
mikeryanComment #3
mikeryan1: install-form-includes-2272011-1.patch queued for re-testing.
Comment #4
mashermike commentedAdded a test only patch and a combination of the fix and tests.
Comment #6
jhedstromComment #7
rpayanmComment #8
rpayanmComment #9
jhedstromSorry this needs another reroll :(
I'll try to review sooner next time.
Comment #10
hitesh-jain commentedComment #11
hitesh-jain commentedRerolled Patch #7 to Latest Code base . Thanks !
Comment #13
nitesh sethia commentedRerolled the patch as per the latest release of D8.
Comment #15
opdaviesThe patch in #13 applies cleanly to HEAD.
Comment #18
mashermike commentedI rerolled my original patches and included a new test only version again.
Comment #20
mashermike commentedComment #21
mashermike commentedThe test only patch failed as expected, so this patch is ready for review.
Comment #23
mashermike commentedOk, i think having the test only patch on the same comment is causing this to be un-reviewable. I am reattaching the patch from #18. It is the fix and the test.
Comment #26
quietone commentedRetesting the patch (#23) and the fail patch (#18) on 8.2.x.
Pretty sure the @file statements can be removed. See the final paragraph in the documentation section, @file: Documenting files.
Comment #28
quietone commentedTests are passing on 8.2.x and the fail patch is fail, so all good. Setting to NR for the minor point in #26.
Comment #39
larowlanIs this still an issue?
install_begin_requestmakes sure to load that fileComment #40
quietone commentedI was curious so I updated the patch and made a fail patch.
Comment #42
quietone commentedI was looking at #3256642: Introduce database driver extensions and autoload database drivers' dependencies and it is also adding install.inc to a form. In that case to the migrate Credential form. This may fix that?
Comment #43
quietone commentedComment #44
daffie commentedIt looks good to me.
Can we get a patch without the changes to drupalci.yml?
After that it is RTBC for me.
Comment #45
quietone commentedThanks.
This patch restores drupalci.yml
Adding tag because this was a bugsmash daily target.
Comment #46
daffie commentedAll code changes look good to me.
For me it is RTBC.
Comment #48
catchCommitted a56ce00 and pushed to 10.1.x. Thanks!