I have rules, pathauto and token installed but when I try to add an action (after adding an event [after saving new content] and condition [content is of type]) I get the following errors:

warning: preg_match() expects parameter 2 to be string, array given in /home/????/public_html/includes/bootstrap.inc on line 751.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 381.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 382.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 381.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 382.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 381.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 382.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 381.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 382.

Although it seems to appear with adding any action. The page comes up fine, and then I am able to add the action and on the following "Editing Action" screen I get a repeat of the first error. (the others are gone):

warning: preg_match() expects parameter 2 to be string, array given in /home/annalin1/public_html/includes/bootstrap.inc on line 751.

I'm on drupal 6.8 PHP 5 Apache Mysql set up. Any help greatly appreciated! :)

Comments

amitaibu’s picture

Component: Rules Core » Rules Engine
Status: Active » Postponed (maintainer needs more info)

Please try it with the DEV release off all 3 modules

adshill’s picture

Version: 6.x-1.0-beta3 » 6.x-1.x-dev

I've updated to the dev versions of Token and Rules. The error is still there - only difference is that the lines on the Illegal Offset are now 387 and 388. Regarding Pathauto - am I right to assume I update to the 6.1.x dev rather than the 6.2.x dev?

Thanks,

Adam

Rosamunda’s picture

I have a similar problem with the beta 3 version and the dev version...

Rosamunda’s picture

Update: I´ve reinstalled rules, (uninstalling it first, of course), and before I did enything, when I click on Rules Ser link, I get this error:
warning: preg_match() expects parameter 2 to be string, array given in ..../includes/bootstrap.inc on line 761.

adshill’s picture

I still get the same with dev versions of all modules. Actually everything seems to be working fine but I'm sure you want to know about the error messages being received!

crsneil’s picture

Same here, regardless of which version of Rules I'm using.

avpaderno’s picture

Title: Illegal Offset Type Error » Illegal offset type error
Status: Postponed (maintainer needs more info) » Active
spydmobile’s picture

I have the same issue. Subscribing.

fago’s picture

ouch. Perhaps you are using the beta3 of content profile? Unfortunately there is bug in its rules integration. If so upgrade to the dev snapshot of content profile. In particular #4 could be caused by that.

If not, we need to find the cause of this errors - I don't get them :(
Which other modules with rules integration or actions are you using? Are you using php4?
If I got I right, there are two different kinds of errors, #1 and #4. Please report which of them you get.

avpaderno’s picture

I don't have the issue, and I am not using Content profile; I would guess that your diagnosis is right.

Rosamunda’s picture

+1

adshill’s picture

I'm not using content profile.

I get the error when adding ACTIONS to the rules, only at this point.

I'm using PHP5. I would give you a list of modules but I'm using a hell of a lot! I will try to do a clean install to check if I get it when I have time but its not right now.

I think the errors are the same... Mine starts with the same line as #4 (you can see this is my original post - only the line number is slightly different).

Thanks.

avpaderno’s picture

I find interesting that some people have this issue, and some don't have it.

Usually, it means the issue is caused by some kind of conflict between two different modules; the problem is to understand which module causes the conflict, and to which module put the blame on. :-)

adshill’s picture

Yeah I agree... If this wasn't such a quick build and complex site I'd have a play around and try to eliminate the problem... instead I'll have to do it the other way around and add the same modules onto a clean build and see if/when the error arrives... which is a big job. If someone else has the time to do it I'll happily paste all the modules I'm using on here, but I'm not likely to have time in the next couple of weeks unfortunately.

adshill’s picture

Yeah I agree... If this wasn't such a quick build and complex site I'd have a play around and try to eliminate the problem... instead I'll have to do it the other way around and add the same modules onto a clean build and see if/when the error arrives... which is a big job. If someone else has the time to do it I'll happily paste all the modules I'm using on here, but I'm not likely to have time in the next couple of weeks unfortunately.

hackia’s picture

OK i got the same error

* warning: Illegal offset type in C:\xampp\htdocs\lasers\modules\rules\rules\rules.module on line 387.
* warning: Illegal offset type in C:\xampp\htdocs\lasers\modules\rules\rules\rules.module on line 388.
* warning: Illegal offset type in C:\xampp\htdocs\lasers\modules\rules\rules\rules.module on line 387.
* warning: Illegal offset type in C:\xampp\htdocs\lasers\modules\rules\rules\rules.module on line 388.

if deactivate content profile module it works , but inned the content profile

any suggestions

Alex Andrascu’s picture

Same here

warning: preg_match() expects parameter 2 to be string, array given in /home/????/public_html/includes/bootstrap.inc on line 751.
warning: Illegal offset type in /home/????/public_html/modules/rules/rules/rules.module on line 381.

It goes away with content profile deactivation and never comes up again.

fago’s picture

If the problem is content profile - which seems the case for most people here, just update to the content profile dev snapshot. It's fixed there.

@adshill:
>I get the error when adding ACTIONS to the rules, only at this point.
I suppose there is a module with some actions that cause this. Try disabling modules until the error goes away.

mitchell’s picture

Title: Illegal offset type error » Illegal offset type error (likely from dated content-profile release)
Status: Active » Postponed (maintainer needs more info)

@fago: should this be in the content-profile issue queue?

fago’s picture

It's already fixed in the dev snapshot.

fago’s picture

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

Issue tags: +content profile

just wanna report: had following errors when adding actions

warning: Illegal offset type in /x/y/z/sites/all/modules/rules/rules/rules.module on line 392.
warning: Illegal offset type in /x/y/z/sites/all/modules/rules/rules/rules.module on line 393.
warning: Illegal offset type in /x/y/z/sites/all/modules/rules/rules/rules.module on line 392.
warning: Illegal offset type in /x/y/z/sites/all/modules/rules/rules/rules.module on line 393.
warning: preg_match() expects parameter 2 to be string, array given in /x/y/z/includes/bootstrap.inc on line 771.

installing the dev-version of content_profile (2009-Apr-07) did heal that for me

adshill’s picture

Just to report in my case it was actually due to an install of content_profile... sorry for any confusion.

klausi’s picture

Status: Active » Fixed

So marking this as fixed, re-open if still an issue.

Status: Fixed » Closed (fixed)
Issue tags: -content profile

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