Problem/Motivation

Issue #3622817 gave the footer Subscribe button the destination it was missing, pointing it at /form/newsletter-subscribe. That fixed the dead button, but the destination is the bare Webform route: no heading, no context, just an email field under the site header.

The template builds every other page from Single Directory Components on a Drupal Canvas page. The newsletter destination should be built the same way rather than being the one page that is raw form output.

Steps to reproduce

  1. Install the Horizon Aid site template.
  2. As an anonymous user, click "Subscribe" in the footer.
  3. Observe the destination has no heading and no supporting copy.

Proposed resolution

Ship a Newsletter Canvas page at /newsletter, composed the same way as the other pages in this template:

  • block.system_breadcrumb_block
  • a media-banner, the opening pattern six of the eight pages in this template already use, holding a badge eyebrow, a heading ("Stay informed", level 1) and a text component for the supporting line
  • a section holding block.webform_block with webform_id: newsletter_subscribe, centred in a group
  • a three column section of card-text icon cards naming what a subscriber receives

Then point the footer Subscribe button at /newsletter instead of /form/newsletter-subscribe.

No new HTML in configuration and no theme change: the page is composed from components the template already ships, so it inherits the brand and stays editable in Canvas.

A form inside a Canvas page completes its submit cycle. That is worth stating, because a form placed in the footer page region does not: there the response it needs to send is wrapped by Twig into a RuntimeError before Canvas can re-throw it, so the submission saves but the visitor sees nothing. Verified on a Canvas page, both with the form at the top level and nested inside a section slot: the confirmation renders, it is visible in the viewport, the submission is recorded and nothing is logged to the canvas channel.

The page this produces, built entirely from the template components:

Newsletter page with a media banner, Newsletter badge, Stay informed heading, the form and three icon cards

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ✅ 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

  • A new "Newsletter" page at /newsletter, built from the template components.
  • The footer Subscribe button now goes there rather than to the bare form route.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Added a Newsletter page for newsletter subscriptions, built in Drupal Canvas, and pointed the footer Subscribe button at it.

Issue fork horizonaid-3622833

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’s picture

Issue summary: View changes
rajab natshah’s picture

Title: Add a Join Our Mission Canvas page and point the footer Subscribe at it » Add a Newsletter Canvas page and point the footer Subscribe at it
Issue summary: View changes
StatusFileSize
new85.91 KB

rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new635 KB

  • rajab natshah committed ef0a4fe9 on 1.0.x
    feat: #3622833 Add a Newsletter Canvas page and point the footer...