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.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2056271.4.flag_.pseudofield-setting-cache-clear-and-refactor.patch | 5.17 KB | joachim |
#1 | 2056271.flag_.pseudofield-setting-cache-clear.patch | 1021 bytes | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedComment #2
joachim CreditAttribution: joachim commentedCome 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.
Comment #3
joachim CreditAttribution: joachim commentedHere's a more dramatic patch which includes the refactoring.
Comment #4
joachim CreditAttribution: joachim commentedTagging as 3.1 blocker.
Comment #5
shabana.navas CreditAttribution: shabana.navas commentedI 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.
Comment #6
joachim CreditAttribution: joachim commentedThanks for trying it out!
Committed.