I has created a rule with 2 actions after a node creation:
- The first create a menu item linked to the created node, and have Main menu as parent (works), and provide a variable
- The second should create a menu item linked to the created node, and should have as parent the firstly created menu item.
At the second step, I got the error then creating a node:
Notice: Undefined offset: 1 in menu_rules_create_item() (line 312 of [...]/sites/all/modules/menu_rules/menu_rules.rules.inc).
I looked for theses lines:
if (is_numeric($menu_parent)) {
$item['plid'] = $menu_parent;
}
elseif (strpos($menu_parent, ':')) {
list($item['menu_name'], $item['plid']) = explode(':', $menu_parent);
}
list($item['menu_name'], $item['plid']) = explode(':', $menu_parent); // line 312
This line is the same as the one in elseif condition.
Comments
Comment #1
Alcalyn commentedComment #2
Alcalyn commentedBy removing line 312, that works perfectly.
I downloaded the dev version, this line is still here at line 414.
Comment #4
ordermind commentedGood catch, thanks! I've updated the dev version with the fix now.