Problem/Motivation

While testing the patch #37 from issue https://www.drupal.org/project/drupal/issues/2678510#new we found a new minor issue
wherein, if only spaces are entered in database form for required fields, and review upgrade button is clicked on, error messages are shown instead of javascript pop up for the field

Steps to reproduce

1. Install standard drupal 9.1x
2. Enable migrate_drupal_ui
3. Go to /upgrade
4. Click continue to get to upgrade/credentials
5. Apply the latest patch
6. Clear the cache
7. Disable browser JS
8. In Database Name field enter space only
9. Click on review upgrade
10. Observe the error message

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

samiullah created an issue. See original summary.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

quietone’s picture

Status: Active » Closed (works as designed)

With javascript disabled and one enters one or more spaces for the database name the error message contains SQLSTATE[HY000] [1102] Incorrect database name ' '. That message is the message received from the db. It is not managed at all by the Credential form. The screenshot in the IS shows an Access denied error. That particular error is the result of entering a correct database name but incorrect credentials. And again it is from the database server.

This form was tested by alexpott in #28 from the issue referred to in the IS. His conclusion was "the form behaves great with JS enabled and it is okay without JS it's just that fields that should be marked as required are not but the error that's display is not bad at all."

That testing plus the fact that the messages being questioned are generated from the database server leads me to the Credential form works as designed.

If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done. Thx