By dcam on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
12.0.x
Introduced in version:
12.0.0
Issue links:
Description:
For Media reference fields that allow multiple values, the "Add another item" button is now displayed outside of the field's description. Previously, the button's markup was included inside the description which resulted in it unintentionally inheriting the description's CSS formatting.
This bug is now resolved for Core templates. If you have overridden the media-reference-help.html.twig template, then you should update your template accordingly.
Before:
...
<div{{ description.attributes.addClass('description') }}>
{% if multiple and description.content %}
<ul>
<li>{{ media_list_help }} {{ media_list_link }} {{ allowed_types_help }}</li>
<li>{{ description.content }}</li>
</ul>
{% else %}
{{ media_list_help }} {{ media_list_link }} {{ allowed_types_help }}
{% endif %}
{% if multiple and button %}
<div class="clearfix">{{ button }}</div>
{% endif %}
</div>
...
After:
...
<div{{ description.attributes.addClass('description') }}>
{% if multiple and description.content %}
<ul>
<li>{{ media_list_help }} {{ media_list_link }} {{ allowed_types_help }}</li>
<li>{{ description.content }}</li>
</ul>
{% else %}
{{ media_list_help }} {{ media_list_link }} {{ allowed_types_help }}
{% endif %}
</div>
{% if multiple and button %}
<div class="clearfix">{{ button }}</div>
{% endif %}
...
Impacts:
Themers