0.416 ms Executing the rule "bettermessagetest" on rule set "After saving new content"
0.561 ms Action execution: "Clean messages"
and after it i see %nodetype %title was created... in message status div
and second issue: after creating set message action and trigger it i have problem with tokens
[node_added:field] (this node added earlier in rules)
but [node:id] works fine
second problem also persist with standard rules message action
Comments
Comment #1
ionmedia commentedi think what cleaning comes before standard message and whats why it is not cleaned
Comment #2
shushu commentedIf you need further help, please export your rules, or describe the situation better.
Testing the cleaning in several cases seems to work fine, but like in any situations - bug might exist...
Comment #3
twooten commentedI can't seem to get this to work. I have tried it with both the 'content is going to be saved' and also 'after content is saved' but the message still shows up. Here is my rule export.
Thanks,
Tim
array (
'rules' =>
array (
'rules_3' =>
array (
'#type' => 'rule',
'#set' => 'event_node_presave',
'#label' => 'Remove message after saving real estate listing node',
'#active' => 1,
'#weight' => '0',
'#categories' =>
array (
),
'#status' => 'custom',
'#conditions' =>
array (
0 =>
array (
'#weight' => 0,
'#info' =>
array (
'label' => 'Created content is Real Estate Listing',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Content',
),
),
'module' => 'Node',
),
'#name' => 'rules_condition_content_is_type',
'#settings' =>
array (
'type' =>
array (
'real_estate_listing' => 'real_estate_listing',
),
'#argument map' =>
array (
'node' => 'node',
),
),
'#type' => 'condition',
),
),
'#actions' =>
array (
0 =>
array (
'#weight' => 0,
'#type' => 'action',
'#settings' =>
array (
'clean' => '1',
'type' => 'status',
'other' => '',
),
'#name' => 'rules_better_message_clean_messages',
'#info' =>
array (
'label' => 'Clean messages',
'module' => 'Messages',
'eval input' =>
array (
0 => 'clean',
1 => 'type',
2 => 'other',
),
),
),
),
'#version' => 6003,
),
),
)
Comment #4
alex.skrypnykI confirm that "Content created" messages do not get cleared "After saving new content"
Comment #5
James-TRMS commentedsame issue here
Comment #6
Jaesin commentedI ran into this same issue.
I decided not to use this module.
I set my action to execute custom php code.
set to: define('REPLACEMENT_MESSAGE', t('Your application has been received.'));
Then I used hook_exit in a custom module to check and replace the messages;
(a simple version)
if(defined('REPLACEMENT_MESSAGE')){
drupal_get_messages('status');
drupal_set_message(REPLACEMENT_MESSAGE, 'status');
}
I hope this helps someone.
Comment #7
nitebreedAlso happening in 7.x-1.0
Comment #8
mrweiner commentedWhen using "clean messages" option, sometimes it appears and sometimes it does not. I'm not sure how to re-create the non-display. When using "send message" option with cleaning enabled, the message does appear. In both cases, when the custom message appears, it appears along with the default message.
Comment #9
shushu commented