When new content is created, Drupal sets this system message:
"[content-type] [content title] has been created."
Is there any way this message can be unset or overridden with an Action?
When new content is created, Drupal sets this system message:
"[content-type] [content title] has been created."
Is there any way this message can be unset or overridden with an Action?
Comments
Comment #1
timd.mackey commentedSubscribing. I'd also like to be able to do this, specifically so that I can override the default message when a user saves changes to their account.
Comment #2
Mark Nielsen commentedComment #3
kopeboyYep please. Not only this message, but any message created for the same event we are working on with the Rule.
If that event has already a message and we set one within the Rule we will have both :(
Is there some configuration we are missing?
Comment #4
Chewits commentedSeeking how to solve this issue, too...
Comment #5
Chewits commentedI've found the related issue: https://www.drupal.org/node/409090
and an obsolete module https://www.drupal.org/project/rules_better_message
which could solve the problem by cleaning unnecessary messages and showing your own one.
But this module does not work for me in 7.x :(
Comment #6
Torenware commentedYou'd need a custom action to do this. This actually isn't that hard to do.
In YOUR_MODULE.rules.inc:
I haven't tested this (been a while since I worked on Drupal 7; I'm doing D8 now), but this should be close to what you want.
Comment #7
Chewits commentedThank you, Rob. I solved my initial problem without Rules, though.
In fact, I needed a bit more - to show different status messages depending on whether a content was published or not. It's needed for forum topics only.
Here is my code:
Ref (rus): www.ishmuradov.com/page/drupal-7-izmenjaem-statusnye-soobshhenija
Hope this helps someone,
Alexander
Comment #8
amerie commentedHere is code for a Rules action to clear all or some messages from the site (specified by type and/or regular expression applied to the message text):
Comment #9
tr commentedThis seems to have been answered several times already.
Comment #11
bmango commentedMany thanks for the code in #8. It worked perfectly!