Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When the table prefix is invalid on the Database connection page during the installation process then the error message is attached to a non exists form element.
Proposed resolution
Fix the $errors
in the \Drupal\Core\Database\Install\Tasks::validateDatabaseSettings()
Remaining tasks
- Fix the bug.
User interface changes
No user interface changes
API changes
No API changes
How to reproduce
- Start to install a brand new Drupal 8 site
- On the Database connection page fill everything correctly except the "Table name prefix" field in the "Advanced options" fieldset.
Fill it with a value like this: asd*+$ - Press the "Save and continue" button.
- You will see the error message, but the "Advanced options" fieldset is in the collapsed state and the "Table name prefix" field is not highlighted
Comment | File | Size | Author |
---|---|---|---|
#2 | Screen Shot 2014-03-30 at 12.20.38 .png | 49.53 KB | floretan |
#1 | drupal-table-prefix-error-message-2228885-01.patch | 1.01 KB | Sweetchuck |
Comments
Comment #1
SweetchuckComment #2
floretan CreditAttribution: floretan commentedThe change is quite trivial (adressing the element correctly in the form array). The tests pass and manual testing confirmed both the problem and the solution.
The attached screenshot shows the correct behavior with the patch applied.
Comment #3
alexpottCommitted 8ebee83 and pushed to 8.x. Thanks!