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.
We should use drupal_html_id() to create html-ids, otherwise there are possible conflicts, as html-ids should be unique.
File: media_gallery.module
Function: media_gallery_preprocess_field
Line: ~ 1324
foreach ($variables['items'] as $delta => $item) {
$variables['item_attributes_array'][$delta] = array('id' => 'media-gallery-media-' . $delta);
}
Related issue: #1327762: Media Gallery W3C Validation fail
Maybe we need also to modify media_gallery_ajax_sort() to remove possible suffix values, generated by html_drupal_id().
Comments
Comment #1
ivnish CreditAttribution: ivnish commented