- πΊπΈUnited States bluegeek9
Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.
I'm using Styles with the Media module and noticed that upon selecting a file style format, the wrapper divs of that field would get printed, even if the field is empty:
<div class="field field-name-field-header field-type-file field-label-hidden clearfix"><div class="field-items"></div></div>
I think it has to do with the styles_field_formatter_view function, where the $element array will always have the #formatter value, even if there are no items to be displayed.
I attached a small patch to fix this issue.
Closed: outdated
Code
Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.