ID attribute is missing from blocks rendered by BlockFieldFormatter

Created on 31 March 2021, about 4 years ago
Updated 14 August 2024, 8 months ago

Problem/Motivation

Some blocks rely on a ID HTML attribute being present for their functionality (e.g. facets, when used with views AJAX). Rendering a block through this module's Block field formatter means no ID is present, whereas rendering it through the usual block layout system does produce an ID.

Steps to reproduce

Reference a block in a block field, check the markup - there is no ID attribute.

Proposed resolution

Offer the ID to be used, in exactly the same way that core's BlockViewBuilder does.

Remaining tasks

Review patch.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom james.williams

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024