Problem/Motivation

On Drupal 11.4, Drupal Canvas validates every SDC prop's examples value against its declared format. The Hero Card SDC (components/organisms/card-hero/card-hero.component.yml) declares a button_1_url prop with format: uri-reference, but its examples value is "#", which fails uri-reference validation ("Invalid URL format"). Canvas therefore marks the whole Hero Card component INELIGIBLE, so it disappears from the Canvas component library. This breaks the varbase_project functional test 09-04-canvas-hero-cards.feature ("Hero Card component did not appear in the Canvas Library").

This exact one-line fix was already made in commit 01e784c2 on the vartheme_bs5 issue fork branch 3607734-update-drupal-core (issue #3607734), but that commit landed after the #3607734 MR had already merged, so it never reached canonical 5.0.x and has no MR of its own. Filing this fresh issue to land the fix on canonical 5.0.x (referencing #3607734 for context only; that issue is Closed/Fixed).

Steps to reproduce

  1. Install a site with Vartheme BS5 5.0.x on Drupal 11.4 with Drupal Canvas enabled.
  2. Open the Drupal Canvas component library.
  3. Observe that the Hero Card component is missing/ineligible from the library.
  4. Inspect components/organisms/card-hero/card-hero.component.yml: the button_1_url prop has format: uri-reference and examples: - "#", which fails uri-reference validation.

Proposed resolution

Change the button_1_url prop's examples value in components/organisms/card-hero/card-hero.component.yml from "#" to a valid absolute URL, e.g. "https://example.com", so it passes uri-reference validation and the Hero Card component becomes Canvas-eligible again. The default: "#" value is left unchanged.

Remaining tasks

  • ✅ File an issue about this project
  • ❌ Addition/Change/Update/Fix to this project
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

  • rajab natshah committed 8302c557 on 5.0.x
    fix: #3610057 Make the Hero Card SDC Canvas-eligible on Drupal 11.4 (...
rajab natshah’s picture

Assigned: Unassigned » josebc
Status: Active » Needs review
Issue tags: +vartheme_bs5-5.0.0-beta3
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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