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.
It seems the hook_flag_validate() is called only after 2 Flag module validations.
imho, the hook should be invoked before any validation.
Ex. Change the permission message for unauthenticated user for a Flag : "Please login to flag it!".
Comment | File | Size | Author |
---|---|---|---|
#1 | validation_hook_before_any_validation-2217759-1.patch | 1.12 KB | vasike |
Comments
Comment #1
vasikeand there is the patch.
Comment #2
joachim CreditAttribution: joachim commentedWe check the simple stuff first, before invoking a hook, for a number of reasons, one of which is performance. Also, it makes sense not to bug implementations of the hook with flagging attempts that don't even make sense (wrong bundle) or should not be allowed by permissions.
If you want to change that string so anonymous users are invited to log in, I'll consider an issue for that!
But this I think is a wontfix, sorry.
Comment #3
joachim CreditAttribution: joachim commented