Problem/Motivation

A PDO error is thrown when one uses HS Select to add a node to a menu item. This was reported

How to reproduce?

(This is what is happening for me with 7.x-3.0-alpha5)
Create a node.
Go to the Menu vertical tab when looking at node edit.
Select a menu item and/or sub menu items from the HS drop downs
Save
A popup appears with the PDO Error

Proposed resolution

I can't tell exactly what should be done. No patches have been proffered.

Original report by [Alauddin]

"After HS Select Menu Module is activated no new menu items can be created."

Comments

rajatgusain’s picture

Status: Active » Postponed (maintainer needs more info)

Hierarchical Select Menu work as it should.
Please provide more information so that we can replicate the issue.

Regards
Rajat Gusain

Brian A.’s picture

Priority: Normal » Major

I am experiencing the same issue. Currently developing a new site with Drupal 7.14. After installing the Hierarchical Select module and enabling it, I am unable to create a NEW menu item. Disabling the module allows me to create menu items as intended, and they are available to me after re-enabling the module. The error I am receiving when trying to create a menu link is:

Notice: Undefined offset: 1 in menu_edit_item_submit() (line 419 of /my_site_path/drupal/modules/menu/menu.admin.inc

(my_site_path is my actual site path)

Have there been any updates to this? Seems like a major issue to me...

tammo’s picture

+1
Enabling HS Menu made it impossible to save nodes.

From the watchdog:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'menu_name' cannot be null: UPDATE {menu_links} SET p1=:p_1, p2=p2, p3=p3, p4=p4, p5=p5, p6=p6, p7=p7, p8=p8, p9=p9, depth=depth + :depth, menu_name=:db_update_placeholder_0 WHERE (menu_name = :db_condition_placeholder_0) AND (p1 = :db_condition_placeholder_1) ; Array ( [:p_1] => 193 [:depth] => 0 [:db_update_placeholder_0] => [:db_condition_placeholder_0] => menu-kleinestappen [:db_condition_placeholder_1] => 193 ) in _menu_link_move_children() (line 3470 of [mysite]\includes\menu.inc).

Hope this helps.
Disabling HS Menu solved my problem... I can save nodes again.

drupalpal’s picture

Any updates on this? Was this problem solved in the current dev version?

giupenni’s picture

+1 same problem

shoufeng.xi’s picture

Assigned: Unassigned » shoufeng.xi

same problem

webmestre’s picture

same problem on D-7.22

kars-t’s picture

Assigned: shoufeng.xi » Unassigned
Status: Postponed (maintainer needs more info) » Active

Updating Issue status. Seems that HS is hooking something it shouldn't

kars-t’s picture

Title: Add link to new menu doesnt work when Hierarchical Select Menu module is enabled » After HS Select Menu Module is activated no new menu items can be created

Updating issue title. Please help to create a better summary and how to reproduce it.

webmestre’s picture

Same problem again on a d-7.22 version totaly new and clean

Minna’s picture

Title: After HS Select Menu Module is activated no new menu items can be created » Cannot add links to new menu when Hierarchical Select Menu is enabled

Drupal 7.22, Hierarchical Select 7.x-3.0-alpha5

Same problem.

One thing I noticed, after I select to add a link from the new menu, admin/structure/menu/manage/menu-xxx/add does not display the new menu name is the parent link.

I was able to add a link to a new menu once I disable Hierarchical select menu. I enabled the Hierarchical select menu and still can add links to that menu but not to a new menu again.

Hope this helps.

Adamation’s picture

7.x-3.0-alpha5 - Same issue.

i also noticed I was able to create new menu links to menus created prior to HS, but menus after HS would not allow me to create new links.

I had to disable HS to allow the creation of the menus.

thelee’s picture

Priority: Major » Critical

Also have this same issue.

geerlingguy’s picture

Version: 7.x-3.0-alpha5 » 7.x-3.x-dev

I'm also hitting this error, but only when saving menu items into the Main menu (not other menus, like the Management menu). Drupal 7.21/7.22, HS menu 7.x-3.x-dev.

Notice: Undefined offset: 1 in menu_edit_item_submit() (line 426 of drupal/modules/menu/menu.admin.inc).
Minna’s picture

I had been getting this error with HS 7.x-3.x-alpha5 as well. However it stopped after I flushed the Menu cache. Still cannot add a new Menu item without disabling HS.

chrisjlee’s picture

+1 not able to enable menu items without disabling this module

chrisjlee’s picture

Issue summary: View changes

Updating issue summary

adriancotter’s picture

Version: 7.x-3.x-dev » 7.x-3.0-alpha5

I edited the summary for how this error occurs with us. We are using alpha5.

thelee’s picture

hey everyone/maintainer, looks like this issue has a patch that's been committed to -dev.

See here: #1483112: Cannot add node to a menu #1272538: Hierarchical Select Menu should also flatten on submit of node forms

For those of us who, by enterprise policy, can't use -dev releases, it'd be nice to have a new release rolled out (-alpha6?).

wim leers’s picture

Status: Active » Closed (duplicate)

A new alpha will follow shortly. According to #18 it's been fixed in -dev.

wim leers’s picture

Issue summary: View changes

fleshing out summary