field_view_field fires hook_field_attach_view_alter and passes a context array containing various bits of useful information, however the field name is missing. The field_name is passed inside the $result variable, however if the field contains no content, this variable is NULL. It would be useful to have the field name passed inside $context so that it is available regardless of the status of $result.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scottpashley created an issue. See original summary.

scottpashley’s picture

segi’s picture

Thanks @scottpashley for patch and that you opened this ticket. My task to show all fields which is in node it doesn't matter the field has value or not. I tried to solved this problem hook_field_attach_view_alter with generated field structure. The context argument contains the display settings but I couldn't identify which field has these settings, because the context didn't have the field name.

segi’s picture

Version: 7.44 » 7.x-dev
segi’s picture

Status: Active » Needs review