I have created a rule - that a message should display after saving new content.
I want this message to appear after the drupal message 'content type... has been created'.
I've given the message a weight of +10 but it still shows before the drupal default message.
Is there a way to change this?
Thanks

Comments

hyperlinked’s picture

Title: Weight option doesn't work with default drupal messages. » Weight Setting for Rules Not Working
Issue summary: View changes

I'm having the same issue, but it's not just for the default messages. The weight setting for rules appears to be completely meaningless as far as I can tell. I was setting weights to create a certain execution order, but it always executes my rules in the order that they were first entered.

hyperlinked’s picture

Category: Support request » Bug report
hyperlinked’s picture

Title: Weight Setting for Rules Not Working » Weight option doesn't work with default drupal messages.
Category: Bug report » Support request

Ignore my last comment. What I thought was an issue caused by weights being ignored was due to something else. I still don't know that weights are working as expected, but I don't know that they aren't.

tr’s picture

Status: Active » Fixed

@hyperlinked said:

Ignore my last comment

So the only question remaining is that of the original poster, @LTech.

Frankly I'm a little puzzled as to what this means:

I've given the message a weight of +10 but it still shows before the drupal default message.

First of all, the Drupal default message is not generated by Rules, so I'm not sure why you think that a Rules setting will control the default message (or any other non-Rules message, for that matter). Second, the Rules action "Show a message on the site" does not have a weight parameter. Messages created by Rules actions will show in the order that those actions were executed. If you're referring to the weight of the Rule itself, the description of that parameter says "Order rules that react on the same event. Rules with a higher weight are evaluated after rules with less weight." This gives no guarantee of order for rules which act on different events, or the order of Rules messages vs messages created by other modules - to do that you will have to hook into core Drupal. See #1839106: How to display a custom rules message *below* a system message? for ways to do that.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.