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

Created on 12 December 2023, 7 months 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 7 months 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.69.0 2024