I've attempted to install this new version of Rules however I've discovered something strange after I install the module.

When accessing the menu link Administration > Rules I get a blank page except for the php error: Fatal error: Unsupported operand types in xxxxx/modules/system/system.module on line 627

When debugging this system.module line 626 shows

$item += db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path'])); 

The error seems to be caused by db_fetch_array returning false. $item['path'] has the value of admin/rules. I constructed the query myself and ran it, the query returned no rows.

I ran a generic query based on the one above and found the following information:
Query: SELECT mlid, plid, menu_name, link_path, router_path, link_title FROM menu_links ml WHERE ml.router_path like 'admin/rules%' AND module = 'system'
Query Result:

"mlid","plid","menu_name","link_path","router_path","link_title"
600,229,"navigation","admin/rules/autocomplete","admin/rules/autocomplete",""
601,229,"navigation","admin/rules/ie","admin/rules/ie","Import / Export"
606,229,"navigation","admin/rules/rules/%","admin/rules/rules/%",""
609,0,"navigation","admin/rules/rules/%/add","admin/rules/rules/%/add","Add"
610,0,"navigation","admin/rules/rules/%/clone","admin/rules/rules/%/clone","Clone rule"
612,0,"navigation","admin/rules/rules/%/delete","admin/rules/rules/%/delete","Delete"
615,0,"navigation","admin/rules/rules/%/delete/%","admin/rules/rules/%/delete/%","Delete"
616,0,"navigation","admin/rules/rules/%/edit/%","admin/rules/rules/%/edit/%","Edit"
614,0,"navigation","admin/rules/rules/%/revert","admin/rules/rules/%/revert","Revert"
602,229,"navigation","admin/rules/rule_sets","admin/rules/rule_sets","Rule sets"
608,602,"navigation","admin/rules/rule_sets/%","admin/rules/rule_sets/%",""
611,0,"navigation","admin/rules/rule_sets/%/delete","admin/rules/rule_sets/%/delete","Delete"
613,0,"navigation","admin/rules/rule_sets/%/revert","admin/rules/rule_sets/%/revert","Revert"
607,602,"navigation","admin/rules/rule_sets/js","admin/rules/rule_sets/js",""
603,229,"navigation","admin/rules/settings","admin/rules/settings","Settings"
604,229,"navigation","admin/rules/trigger","admin/rules/trigger","Triggered rules"

From the rows above I tried the URI admin/rules/settings and was presented with the rules admin settings page.

Comments

azman’s picture

I should mention that I attempted this upgrade after upgrading drupal core to 6.12

fago’s picture

I don't know how, but somehow you lost this menu item. Have you tried if re-installing helps? Else you could try the "rebuild menus" feature from the devel module.

Anyway, I doesn't look like it's a common problem.

azman’s picture

Status: Active » Closed (fixed)

After disabling the rules module and dependencies, then un-installing the module - the issue has gone. However it has been replaced with a new issue, which I will report in a separate issue.

Changing status to closed.

ginga8’s picture

I also am getting the same issue. I did un-install and reinstall but did not have any success. I am still getting the error.

jvieille’s picture

Same issue.
Also reported here: http://drupal.org/node/458880

kenorb’s picture

Vote_Sizing_Steve’s picture

Un-enabling/re-enabling module fixed this for me.

kanani’s picture

Sometimes just uninstalling/reinstalling doesn't work. If you uninstall rules, then manually remove the admin/rules entry from the menu_links table, then reinstall module it might make the error go away.

thedavidmeister’s picture

in the menu_router table I had a db row that had link_path set to "admin/rules" and router_path to "admin". Changing the router_path to "admin/rules" fixed the issue for me.

vcrkid’s picture

Component: User interface » Rules Core

#10 worked for me, but it wasn't in the menu_router table, but in the menu_links table.

thedavidmeister’s picture

ah yeah, my bad. I think that's a typo, sorry.

kcolwell’s picture

Thanks thedavidmesiter that work perfectly:

update menu_links set router_path to "admin/rules" where link_path like "admin/rules";