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.
I'm getting the following appearing:
<div class="entity entity-bean bean-text-block clearfix" about="/block/header---contact" typeof="" class="entity entity-bean bean-text-block">
i.e. the classes are getting added twice, breaking validation.
Comments
Comment #1
indytechcook CreditAttribution: indytechcook commentedHello and thanks for logging an issue.
Here is bean.tpl.php:
Is it possible your theme is putting the classes array in both attributes and classes? Do you see this issue in other areas where the classes are printed separately then the attributes?
Comment #2
gdaw CreditAttribution: gdaw commentedFor us this issue causes w3c validation errors and therefore fails wcag accessibility requirements.
class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
Classes are being manually added by
print $classes;
, "clearfix" being appended and thenprint $attributes;
is adding the same classes.I would suggest keeping only print attributes since it includes other attributes and adding clearfix to the attributes class array.
We have tested this solution and it seems to be working fine.
Comment #3
gdaw CreditAttribution: gdaw commentedWe found the cause of the problem is theme-related, Omega theme and sub-themes are the source of the class and attributes being duplicated.
class attribute of entity wrapper div is printed twice