Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
As per the title, an empty article element is output when there is no user picture but user pictures are enabled.
Proposed resolution
Move the control in user.htm.twig, i.e.:
{% if content %}
<article{{ attributes }}>
{{- content -}}
</article>
{% endif %}
Remaining tasks
Write a patch, or discuss if there is a larger issue at play here.
User interface changes
None.
API changes
None.
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedClosing as duplicate of #2247677: User picture improvements in node template, even though this is older I forgot about it, lets use the newer issue.