After setting a flag to output as a pseudofield, a manual cache clear is required. This is due to caching in https://api.drupal.org/api/drupal/modules!field!field.info.class.inc/fun....

Conversely, after removing the pseudofield option from a flag, the pseudofield persists in the entity's display options.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Status: Active » Needs review
FileSize
1021 bytes
joachim’s picture

Come to think of it, maybe we should tackle #2056275: refactor _flag_clear_cache() parameters first, and THEN fix this, as the current patch won't fix the problem when importing flags.

joachim’s picture

Here's a more dramatic patch which includes the refactoring.

joachim’s picture

Issue tags: +3.1 blocker

Tagging as 3.1 blocker.

shabana.navas’s picture

Status: Needs review » Reviewed & tested by the community

I have tested this out. Before the patch, I had to do a manual 'Clear cache' for the field to be removed from my entity type's 'manage display' section. After the patch was applied, the field was automatically removed once I unchecked the 'Display link as a field' option for the flag. So, the patch definitely works and should be committed.

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for trying it out!

Committed.

Automatically closed -- issue fixed for 2 weeks with no activity.