Masonry views can generate invalid markup if grouping is enabled and there is a group without a title

Created on 12 December 2023, over 1 year ago

Problem/Motivation

If a masonry display has grouping and one of the groupings doesn't have a title, the opening grouping class div is not generated, because the condition is {% if title and grouping %}

Steps to reproduce

Install masonry views,
Create a view with a masonry display that has grouping, and where one of the values for the grouping field is an empty string

Proposed resolution

Separate the {% if title and grouping %} condition into two conditions in the template

🐛 Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

🇳🇿New Zealand somatick

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @somatick
  • 🇳🇿New Zealand somatick

    Patch attached which separates the condition into two conditions in the template

  • Status changed to Needs review over 1 year ago
  • 🇳🇿New Zealand chroid

    Can confirm that this also fixes an issue we were facing with grouping and invalid markup (closures).

    Patch applies cleanly.

Production build 0.71.5 2024