I have some rules. On is to redirect the user to the profile and to show the user a message like "hello user, welcome back - Your last login was...."

The message does not appear.

Are system messages created with rules not supported?

Comments

bennos’s picture

I have looked up in rules.
File: system.rules.inc

line 78: function rules_action_drupal_message($settings) {
drupal_set_message($settings['message'], $settings['error'] ? 'error' : 'status');
}

I haven't looked in purr messages code.

Rosamunda’s picture

Subscribing :)

bennos’s picture

Could be a caching problem?!?!

Hook_theme_registry_alter is only new loaded on a cache refresh. will try it out.

tanc’s picture

Hi bennos, did you find out whether it was a caching issue?

bennos’s picture

until yet, I had no time to clear it.

BenK’s picture

Subscribing...

CarbonPig’s picture

Did anyone ever resolve this issue? I'm having the same problem.

Thanks,

CarbonPig

CarbonPig’s picture

CarbonPig’s picture

Bump...

Bilmar’s picture

subscribing

bennos’s picture

another module wirth growl like messages

http://drupal.org/project/rawr

YK85’s picture

Title: Rules??? » Rules Compatibility

Hello,
Is this still an issue?
Thanks!

tanc’s picture

Status: Active » Postponed (maintainer needs more info)

Finally had some time to take a look at this. I did the following test:

  • Installed a fresh Drupal 6.16.
  • Downloaded and installed Purr Messages 6.x-1.x-dev. Installed the purr jquery file in the correct place.
  • Downloaded and installed Rules version 6.x-1.1.
  • Tested Purr by saving the modules page and the blocks page. Purr message displayed correctly.
  • Created a test rule with the following:
    • ON event: Content is going to be viewed
    • Do: Show a configurable message on the site

The test message showed up fine.

To debug this I'll need more details of the exact situation it isn't working for you. Drupal version, Rules version, Purr version. Also details of the rule you created where this error occurs.

Rosamunda’s picture

Status: Postponed (maintainer needs more info) » Active

I can confirm that the error persists.

I´ve got the latest stable releases of purr and rules, and this is my rule:

ON event User has logged in
IF
User has role(s) indent
AND
Userpoints amount is >= than x indent

DO
Show a configurable message on the site

The differencie in my rule is that the triggered event is the same...

Notes:
- I´ve cleared cache
- Purr is working very nicely in every single message on the site. It won´t work with the one that is generated by the rule.

Hope this clarifies.

Thanks for your help!!
Rosamunda

Rosamunda’s picture

Status: Active » Fixed

UPDATE: After deleting my rule and re-creating it, the problem is fixed.

Rosamunda’s picture

Status: Fixed » Active

Well, sorry for the mess, but after several testing (and setting a new D6 install with rules and purr), I must say that the messages fired by the rules module "not always" appears.
I mean this is what I´ve done:
Create a new rule that shows a message each time a user logs in.
The message appears, so it works.

I install purr, theme and configure it.
All system messages (normal and error ones) appears as purr messages.
All goes smooth.

I want to try the message that should appear each time I log in.
I log out and log in again.
It works.
I log out and log in as user A.
It works.
I log out and log in again, as user B.
It won´t appear any message, not in the "purr way" not in any other way.

I check the message syntaxis. It has this tags: <h1> <h2> <small> <b> <a> <br> and the token: [account:user]
I delete all html tags, and write dow a single line of text: "welcome user"
I check it again, and it works again.

Hope this helps to find the problem... I didn´t want to change the title, because I don´t know if this issue should be remaned or maybe started a new one?

Rosamunda

Rosamunda’s picture

Hmm... now that I´m reading your message again, you say:

# Downloaded and installed Rules version 6.x-1.1.

The latest Rules version is the 6.1.2, wich is the one that I´m using.

Could that be related to the issue?

tanc’s picture

Hi Rosamunda, thanks for the detailed bug report. I'm a little strapped for time but I'll try and take a look at how Rules submits its messages and whether there is some kind of race condition that is stopping purr messages from working correctly.

Rosamunda’s picture

Thanks in advance for your help!!
(As I´m not a developer, the only way I think I can help is doing some testing :)

tanc’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Closed (cannot reproduce)

I just took another look at this issue and I can't reproduce the problem at all. On a fresh site installed Rules and Purr Messages 6.x-1.x-dev. I created a new rule with the following:

EVENT
User has logged in

IF
User has role(s) : Authenticated User

DO
Show a configurable message on the site: User login test

I then logged out and logged back in a few times and the message was shown each time. I also turned caching on and the message continued to appear fine.

Feel free to open this ticket again if someone is having problems, but please make sure to submit an accurate bug report with the steps needed to reproduce the issue with a fresh install of Drupal, Rules and Purr Messages.