data-drupal-selector isn't stable since 8.9.0

Created on 9 September 2020, almost 4 years ago
Updated 30 January 2023, over 1 year ago

Problem/Motivation

Form widget/fields id attributes have changed since drupal 8.9.0

Steps to reproduce

Simply add an exposed filter in a view. Id attributes wil be suffixed by a number.
(In my case some date picker fields ids have changed from id="edit-field-date-value" to id="edit-field-date-value--2")

Related

This was introduced by #1831560: Remove Html::resetSeenIds() call during form processing β†’

User interface changes

Strictly speaking we cannot say this is a regression, because drupal works perfectly...
But for those who enrich their form widgets with javascript, via ID selectors, obviously they will find fatal regressions, without errors.

Conclusion

This may be a non fix to revert this patch...?
For other people there, check your javascript id selectors in your cutom code when upgrading to drupal 8.9 or 9.0 !

πŸ› Bug report
Status

Closed: duplicate

Version

9.5

Component
FormΒ  β†’

Last updated 1 minute ago

Created by

πŸ‡«πŸ‡·France pguillard

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs accessibility review

    Used to alert the accessibility topic maintainer(s) that an issue significantly affects (or has the potential to affect) the accessibility of Drupal, and their signoff is needed (see the governance policy draft for more information). Useful links: Drupal's accessibility standards, the Drupal Core accessibility gate.

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.

Production build 0.69.0 2024