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
Comment #1
azman CreditAttribution: azman commentedI should mention that I attempted this upgrade after upgrading drupal core to 6.12
Comment #2
fagoI 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.
Comment #3
azman CreditAttribution: azman commentedAfter 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.
Comment #4
ginga8 CreditAttribution: ginga8 commentedI also am getting the same issue. I did un-install and reinstall but did not have any success. I am still getting the error.
Comment #5
jvieille CreditAttribution: jvieille commentedSame issue.
Also reported here: http://drupal.org/node/458880
Comment #6
kenorb CreditAttribution: kenorb commented#595724: After core upgrade: Fatal error: Unsupported operand types ... /modules/system/system.module on line 627
Comment #7
Vote_Sizing_Steve CreditAttribution: Vote_Sizing_Steve commentedUn-enabling/re-enabling module fixed this for me.
Comment #8
kenorb CreditAttribution: kenorb commented#647064: Fatal error: Unsupported operand types when menu_links query returns no results in system_admin_menu_block()
Comment #9
kanani CreditAttribution: kanani commentedSometimes 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.
Comment #10
thedavidmeister CreditAttribution: thedavidmeister commentedin 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.
Comment #11
vcrkid CreditAttribution: vcrkid commented#10 worked for me, but it wasn't in the menu_router table, but in the menu_links table.
Comment #12
thedavidmeister CreditAttribution: thedavidmeister commentedah yeah, my bad. I think that's a typo, sorry.
Comment #13
kcolwell CreditAttribution: kcolwell commentedThanks thedavidmesiter that work perfectly:
update menu_links set router_path to "admin/rules" where link_path like "admin/rules";