Custom Paragraph Twig Templates Break Mercury Editor Saving and Controls

Created on 30 July 2025, 2 months ago

Problem/Motivation

I am using custom Paragraph and Node Twig templates to restrict my markup to email-friendly only HTML. However, when I assign a Paragraph type with a custom Twig template to the Mercury Editor and add it to my node the Mercury Editor controls are missing in edit mode and when I save the node the Paragraph is not saved.

Steps to reproduce

  • Create a custom template for a Paragraph type (e.g., paragraph--hero.html.twig)
  • Template includes {{ content }} or {{ content|without('field_hero_title') }}
  • Add this Paragraph in Mercury Editor UI on a node
  • Paragraph is not saved and Mercury Editor controls do not display

Tested with:

  • Mercury Editor: 2.2.4
  • Layout Paragraphs: 2.1.1
  • Paragraphs: 1.19.0
  • Mercury Layouts dev-2.0.x

Notes:

  • Removing the custom template restores saving and Mercury controls
  • No PHP or JS errors in logs
  • Happens on multiple Paragraph types

Please let me know what other information I may provide, or if my use-case is not supported. Thank you.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

πŸ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pdimaso

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

Comments & Activities

Production build 0.71.5 2024