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.
Hi. I have two error message, when edit or cancel user.
This is because we have a module i18n. It call second access callback. But it's normal.
Can we use drupal_static for a one call drupal_set_message ? Thanks.
Comment | File | Size | Author |
---|---|---|---|
#2 | userprotect-double-error-message-2536840-2.patch | 1.35 KB | MegaChriz |
#1 | userprotect-double-error-message-2536840-1.patch | 1.71 KB | cherebedov.s |
Comments
Comment #1
cherebedov.s CreditAttribution: cherebedov.s commentedComment #2
MegaChriz CreditAttribution: MegaChriz at WebCoo commenteddrupal_set_message() has a parameter called
$repeat
that - if set toFALSE
- should prevent duplicated messages from being shown. The attached patch sets this parameter toFALSE
. Would that fix your issue as well?Comment #3
cherebedov.s CreditAttribution: cherebedov.s commentedYeah it helped me, thanks. I forgot about this parameter. Your patch is more correct.
Comment #5
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedThanks for reporting back. The patch in #2 is committed.