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

ionmedia’s picture

Title: clean messahes not working, token support for non node objects » clean messages not working, token support for non node objects

i think what cleaning comes before standard message and whats why it is not cleaned

shushu’s picture

If 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...

twooten’s picture

I 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,
),
),
)

alex.skrypnyk’s picture

I confirm that "Content created" messages do not get cleared "After saving new content"

James-TRMS’s picture

same issue here

Jaesin’s picture

I 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.

nitebreed’s picture

Version: 6.x-1.0 » 7.x-1.0

Also happening in 7.x-1.0

mrweiner’s picture

Category: support » bug

When 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.

shushu’s picture

Status: Active » Closed (won't fix)