'div' is not working for the Card SDC's heading_html_tag prop "[heading_html_tag] Does not have a value in the enumeration ["h1","h2","h3","h4","h5","h6"]"

Created on 7 August 2024, 5 months ago
Updated 21 August 2024, 5 months ago

Problem/Motivation

'div' was added to the allowed tags in 📌 Allow DIV als element for card_title_tag (SEO relevant) Fixed , but for existing pages (which used Radix before this change), 'div' still does not work:

"Drupal\Core\Render\Component\Exception\InvalidComponentException: [heading_html_tag] Does not have a value in the enumeration ["h1","h2","h3","h4","h5","h6"] in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 203 of core/lib/Drupal/Core/Theme/Component/ComponentValidator.php)."

Steps to reproduce

Add card SDC like so:

{%
  include 'radix:card' with {
    card_title: name,
    card_title_tag: 'div',
    card_title_utility_classes: ['h5'],
    card_utility_classes: ['text-center', 'fs-sm'],
    card_border: true,
    card_body: content|without('field_coverimage'),
    card_link_url: url,
    card_link_text: 'Details'|t,
    card_link_utility_classes: ['mt-3', 'btn-outline-dark'],
    card_media: content.field_coverimage,
  }
%}

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

6.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024