On this page
Fixing a rule that "breaks" after renaming a flag
The Flag module defines two events for every flag you create (For example, for the bookmarks flag there are the two events "A node has been flagged, under Bookmarks" and "a node has been unflagged, under Bookmarks").
The names of these events have the machine-name of the flag embedded in them.
The problem
Let's suppose you create a rule that is connected to some flag event.
And let's suppose you later rename the machine-name of this flag.
Rules will no longer recognize the old flag event. That's because Flag is no longer declaring it.
You'll want to re-connect your rule to some valid flag event. But Rules' UI won't let you do this: it doesn't provide a link for editing this "dangling" rule. (This should be considered a bug in Rules.)
The solution
The solution is simple: Go to the export screen and export your rule. You should be able to easily recognize the old flag name in the textual representation: change it to your new one. Then to go the import screen and import this corrected version.
(BTW, this export/import trick can be used with other modules, e.g. Views, to quickly switch the flags used.)
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion