Active
Project:
Templates
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2020 at 04:52 UTC
Updated:
20 Jul 2020 at 04:52 UTC
Jump to comment: Most recent
I've been trying to track down why the contents of a text Summary field of a Basic Page type is wrapped in a <p></p> tag for some nodes and not others. This issue seems to go beyond the twig templates.
In the example below (with twig debug = true), the theme is a child of Bartik, and is obviously using the parent templates. When you select 'Full HTML' for the Body field instead of 'Basic HTML', the <p></p> tag wrapping the SUMMARY TEXT disappears.
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'field' -->
<!-- FILE NAME SUGGESTIONS:
* field--node--body--page.html.twig
* field--node--body.html.twig
* field--node--page.html.twig
* field--body.html.twig
x field--text-with-summary.html.twig
* field.html.twig
-->
<!-- BEGIN OUTPUT from 'core/themes/bartik/templates/classy/field/field--text-with-summary.html.twig' -->
<div property="schema:text" data-quickedit-field-id="node/1/body/en/teaser" class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item">SUMMARY TEXT</div>
<!-- END OUTPUT from 'core/themes/bartik/templates/classy/field/field--text-with-summary.html.twig' -->
Comments