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.
When disableing the "Add views row classes" option in views unformatted list style, the output looks like
<div >
This is caused by the following code pattern:
<div <?php if ($classes_array[$id]) { print 'class="' . $classes_array[$id] .'"'; } ?>>
The problem is obvious, the whitespace has to be moved into the if condition. This is a problem in all views templates. If this patch is reviewed and there are no reasons to not change this, I'm willing to make a patch for every template I find.
Comment | File | Size | Author |
---|---|---|---|
#1 | empty-div-1855816-1.patch | 559 bytes | Hydra |
Comments
Comment #1
Hydra CreditAttribution: Hydra commentedHere the patch
Comment #2
dawehnerThis change looks perfect, so committed and pushed to 7.x
I don't think this makes sense to port to drupal 7 as there will be twig templates anyway.