feat: #3614494 Fill the event banner from its fields: category, date and registration link
Issue: https://www.drupal.org/project/horizonaid/issues/3614494
AI-Generated: Yes
Problem
The event full page's banner carried no category, no date and no registration link — nothing on it came from the event's own fields. Two things blocked that:
- A Canvas binding that reaches a taxonomy term rendered empty for site visitors. It needs two permissions, checked in order:
view terms in <vocabulary>(entity access) andview term names in <vocabulary>(field access). Granting only the first still fails. Varbase 11 grants neither to anonymous or authenticated, so every term-backed component is silently empty on a fresh site, and it surfaces as a Twig "NULL value found" error that reads like a broken expression. - There was no field for a registration link at all.
Resolution
- New
field_registration_urllink field on the Event bundle (cardinality 1, label "Registration link"), plus its widget on the event form display. canvas.content_template.node.event.full: the banner is now, in order, a taxonomy chip bound tofield_event_categoriesdelta 0 → term name, the title, the description, a date bound tofield_whendelta 0 (Smart Date timestamp) with a calendar glyph, and a Register Today button bound tofield_registration_url, withspacercomponents for the vertical rhythm and the copy kept in the 67-33 column band the design uses.grantPermissionsonuser.role.anonymousanduser.role.authenticatedforview terms inandview term names inon bothevent_categoriesandevent_topics.
Multi-value fields do bind in a full content template as long as the expression carries an explicit delta (␞0␟) — an earlier assumption that they cannot was wrong. The real cause was the term permissions above.
Verification
Applied on a Varbase 11 dev site and checked in a real browser on two event pages: the chip reads "WEBINAR" and "In-person" respectively, each page shows its own date ("12 June 2027", "17 June 2027") with the calendar glyph, and the Register Today button renders as a pill opening in a new tab. 22 components in the template, config.typed validation reports 0 violations, 0 render errors on the page.
Dependencies and known risk
- The template pins the Canvas
component_versionof the Date component that the matchingvartheme_bs5_horizonaidchange introduces (issue #3614098), so this MR must land after that one. - Separately, pinning
component_versionhashes at all currently breaks a fresh install of the published site template: applyingcanvas.content_template.node.event.fullthrows'64089b7681474537' is not a version that exists on component config entity 'sdc.vartheme_bs5_horizonaid.button'. Available versions: 'e151432379f663fb'.Both hashes exist on a finished site, so it is an ordering problem — at recipe-apply time during install the theme has registered only one version. That is a separate defect, not introduced here, and it is not fixed by this MR.
Checkpoints
- 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