Single Import configuration "Configuration name" field validation

Created on 17 July 2020, almost 4 years ago
Updated 8 June 2023, 12 months ago

Problem/Motivation

To add a validation to the "Configuration name" field when the form is submitted.

Steps to reproduce:
- Go to admin/config/development/configuration/single/import
- Ensure HTML5 validation is disabled
- Select the value "Simple configuration" for "Configuration Type" field
- Leave blank the "Configuration name" field
- Click 'Import'

Expected result:
- Error message because the "Configuration name" is a required field when using the Simple configuration type

Actual result:
- The form doesn't track an error related with the "Configuration name" field blank.

Proposed resolution

To add a validation using the form_validate form.
When the configuration name field is empty display, "The Configuration name field is required."

Remaining tasks




Commit

User interface changes

When the configuration name field is empty at /admin/config/development/configuration/single/import for an import of simple configuration dispaly, "The Configuration name field is required."

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
ConfigΒ  β†’

Last updated 24 days ago

Created by

πŸ‡§πŸ‡·Brazil igorbarato

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Tested following the steps in the IS using this chrome plugin https://chrome.google.com/webstore/detail/html5-form-validation-rem/dcpa...

    Verified the issue and that the patch solves it.

    Reading the comments see the last point #22 was addressed.

    Good work.

  • Status changed to Needs work over 1 year ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    This is testing a UI issue on an unsupported version of Drupal. Let's get this testing on a supported version of Drupal and check that is applies to 9.5, 10.0 and 10.1

    This is changing the UI so adding tag. And let's get a ux review of the new text. And that will need screenshots available from the IS.

  • last update 12 months ago
    30,338 pass
  • Status changed to Needs review 12 months ago
  • πŸ‡§πŸ‡·Brazil igorbarato

    I tested the patch on Drupal 9.5, 10.0, and 10.1 and it's working correctly. Adding screenshots of each version.

    Drupal 9.5.x

    Drupal 10.0.x

    Drupal 10.1.x

  • last update 12 months ago
    28,523 pass
  • last update 12 months ago
    29,418 pass
  • πŸ‡³πŸ‡±Netherlands yoroy

    Thank you for the screenshots, they help with reviewing UI :)

    Could the error message list the fields in order of their appearance on the form, so 'name' first, then 'paste...' if both have errors?

    (Unrelated to the actual bug being worked on here, but anyone else find that "Paste your configuration here" label reading weirdly in context of the error message?)

  • Status changed to RTBC 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks @yoroy

    Moving back to RTBC has no code change has happened since #28

  • last update 12 months ago
    28,654 pass, 3 fail
  • Status changed to Needs review 12 months ago
  • πŸ‡³πŸ‡±Netherlands yoroy

    I did have a question :)

    Could the error message list the fields in order of their appearance on the form, so 'name' first, then 'paste...' if both have errors?

  • Status changed to Needs work 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    That's a good catch. Also agree the errors should appear in the order of the form. Especially since there's no indicator which error goes to which form element.

Production build 0.69.0 2024