Hello, I upgraded from 1.1 to 2.x-dev because of the rules support that seems pretty nice.

I just had these warnings and they were gone after I flushed the cache but they are back.
warning: Illegal offset type in /srv/d_lce/www/***/htdocs/includes/form.inc on line 1373.
warning: Illegal offset type in /srv/d_lce/www/***/htdocs/sites/all/modules/rules/rules/rules.module on line 196.
warning: Illegal offset type in isset or empty in /srv/d_lce/www/***/htdocs/sites/all/modules/rules/rules/rules.module on line 80.
warning: Illegal offset type in /srv/d_lce/www/***/htdocs/sites/all/modules/rules/rules/rules.module on line 197.
warning: Illegal offset type in /srv/d_lce/www/***/htdocs/sites/all/modules/rules/rules/rules.module on line 200.
Sometimes, only the first warning shows.

I use Drupal 6.16 (php 5.2.3) and Rules 6.x-1.2.

Also, my /admin/rules/trigger now throws an error :
Fatal error: Unsupported operand types in /srv/d_lce/www***/htdocs/sites/all/modules/rules/rules/rules.module on line 348

Thank you for this very nice module.

CommentFileSizeAuthor
#9 rules_unique_defaults.patch983 bytesberdir
#2 WebKit.png198.52 KBethnovode

Comments

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

- Do the above errors happen all the time or just on specific pages/actions (if the latter, which)?
- Do you have any rules configured/enabled?
- What is displayed when you enable debug the rules settings
- Which rules version are you using? Maybe updating to the latest version might help

ethnovode’s picture

StatusFileSize
new198.52 KB

Thank you for you quick answer.

- The warnings don't show all the time for a page. For exemple, I saw it on /admin/build/modules /admin/build/themes /admin/build/contact , on some page of the site using views. The fatal error only occurs on /admin/rules/trigger and is always there.

- I have rules configured and enabled for : After saving new content ; Workflow state has changed ; Content is going to be saved ; User is going to view a page ; A node has been flagged ; After updating existing content ; User account details have been updated.

- When I enable debug :

0 ms "User is going to view a page" has been invoked.
6.772 ms Executing the rule "Devis Express lieu à partir de la sélection" on rule set "User is going to view a page"
6.869 ms Evaluation of "User is going to view a page" has been finished.

- I use the last stable 6.x-1.2 from 2010-Mar-26

berdir’s picture

Status: Postponed (maintainer needs more info) » Active

Ok, thanks, I need to test, I assume I'm using an outdated version myself.

Anyway, one last question for now, can you confirm that those erors only show up when privatemsg_rules is enabled?

ethnovode’s picture

Yes I don't see those warnings when privatemsg_rules is disabled. And the fatal error goes away too.

berdir’s picture

I'm using rules 1.2 too and I can't reproduce this. Maybe it's a conflict with another module that provides something with the same name.

Can you provide a list of your enabled modules, especially those that have rules integration?

You can also try to disable them one by one until privatemsg_rules works on admin/rules/trigger. The last-disabled module will be the one that is causing this and then we can start to figure out what to do to have them working together.

berdir’s picture

Status: Active » Postponed (maintainer needs more info)
ethnovode’s picture

I think I found it ! Thank you very much for your help.

It seems that there was a conflict between privatemsg_rules and Node Limit. I will try Node Limit Number which has rules support now and is still in development. I will post back.

Edit : Oops, I was already using node limit number, not node limit. So the conflict is with Node Limit Number 6.x-2.0-alpha3 and 6.x-2.x-dev from 2010-Feb-25.

ethnovode’s picture

Do you want me to open a bug report in the node limit number issue queue or could this be fixed by you ?

berdir’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new983 bytes

Ok, I found the issue.

Default rules need to have unique name or they are merged in a strange way that breaks things. By default, rules uses the id of the rule in the database, so you have for exaple "rules_2", but that is obviously not unique if another module does the same.

I renamed the two default hooks, the attached patch should fix this for you. I suggest that you open a new bug report for node_limitnumber too, suggesting that they rename their defaults too since this could happen with every module that keeps these default names.

You could even think about creating a bug report for rules.module which could try to figure out that something is wrong with the default defintition and display a warning/error instead of a fatal error.

Please try the patch and set to RTBC once you've tested it, thanks.

ethnovode’s picture

Status: Needs review » Reviewed & tested by the community

Excellent, nice catch. That was indeed the problem, your patch works fine, I don't see warnings anymore and the fatal error is gone.
I will post back to rules and node limit number, thank you very much.

berdir’s picture

Great, thanks for the fast responses and your testing! I will commit the patch soon.

Please report any bugs you notice in the 2.x-dev release, I'm sure there are a few and testers are always needed :)

If you want to help with future development of the module, it would also be great if you can test features you're interested in from the issue queue.

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Commited to 6.x-2.x, thanks for reporting!

Status: Fixed » Closed (fixed)

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