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.

#1 empty-div-1855816-1.patch559 bytesHydra
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Hydra’s picture

559 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es). View

Here the patch

dawehner’s picture

Status: Needs review » Fixed

This 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.