Setup
- Created Panel Page with path in Main Menu.
- Title: Health Insurance
- Path:
/health
/admin/structure/menu/manage/main-menu), I "Add link" and create an additional menu item.- Title: What You Need To Know
- Path:
/health - I then drag it to become a sub-menu item of Heath Insurance, the menu item created by Panels.
- Use case: I do this so that the parent menu item has an active first child item in its sub-menu.
(same as Panel Page)
- I edit the Panel Page, and in Settings >> Basic I change the path to reflect
/health-insurance
A Quick Note
I've found it to be the case that when I create a menu item in Panel Pages, if even simply reorder the menu item at /admin/structure/menu/manage/main-menu, I am forced to "reset" it if it takes on any future changes from the Panel Pages basic settings page. This is a great annoyance of course, but it hasn't led me to say anything until now because of this finding.
Crash & Burn
As aformentioned, in order to reflect path changes in #3 above, I reset the menu item created by Panels and am warmly greated with the following:
- Notice: Undefined index: health in menu_reset_item() (line 424 of /var/www/[site]/modules/menu/menu.module).
- Notice: Undefined index: title in _menu_link_build() (line 2676 of /var/www/[site]/includes/menu.inc).
- Notice: Undefined index: path in _menu_link_build() (line 2677 of /var/www/[site]/includes/menu.inc).
- PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'link_path' cannot be null: UPDATE {menu_links} SET menu_name=:db_update_placeholder_0, plid=:db_update_placeholder_1, link_path=:db_update_placeholder_2, router_path=:db_update_placeholder_3, hidden=:db_update_placeholder_4, external=:db_update_placeholder_5, has_children=:db_update_placeholder_6, expanded=:db_update_placeholder_7, weight=:db_update_placeholder_8, depth=:db_update_placeholder_9, p1=:db_update_placeholder_10, p2=:db_update_placeholder_11, p3=:db_update_placeholder_12, p4=:db_update_placeholder_13, p5=:db_update_placeholder_14, p6=:db_update_placeholder_15, p7=:db_update_placeholder_16, p8=:db_update_placeholder_17, p9=:db_update_placeholder_18, module=:db_update_placeholder_19, link_title=:db_update_placeholder_20, options=:db_update_placeholder_21, customized=:db_update_placeholder_22 WHERE (mlid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => navigation [:db_update_placeholder_1] => 0 [:db_update_placeholder_2] => [:db_update_placeholder_3] => [:db_update_placeholder_4] => -1 [:db_update_placeholder_5] => 0 [:db_update_placeholder_6] => 1 [:db_update_placeholder_7] => 0 [:db_update_placeholder_8] => 0 [:db_update_placeholder_9] => 1 [:db_update_placeholder_10] => 447 [:db_update_placeholder_11] => 0 [:db_update_placeholder_12] => 0 [:db_update_placeholder_13] => 0 [:db_update_placeholder_14] => 0 [:db_update_placeholder_15] => 0 [:db_update_placeholder_16] => 0 [:db_update_placeholder_17] => 0 [:db_update_placeholder_18] => 0 [:db_update_placeholder_19] => system [:db_update_placeholder_20] => [:db_update_placeholder_21] => a:0:{} [:db_update_placeholder_22] => 0 [:db_condition_placeholder_0] => 447 ) in menu_link_save() (line3053 of /var/www/[site]/includes/menu.inc).
Aftermath
Interestingly, the menu item is reset and reflects the path change in Main Menu. However, exact duplicates of the Health Insurance and What You Need To Know menu items (both with path /health, not /health-insurance) are placed in the Navigation menu. What's more, both paths work along with the newly reset path, /health-insurance.
In addition, without having touched the path in the basic settings of Panel Pages, I am shown a "reset" link in the Main Menu. After clicking this, it appears no changes take place except that the "reset" link is gone.
Testing
Now, let's restore the backup.
- Do #1
- Do #2
- Do #3
- Delete #2
- Reset menu item.
- Same PDOException.
Restore backup.
- Do #1
- Do #2
- Reset menu item. (No change, except "reset" disappears.)
- Do #3
- Duplicate appears - One Health Insurance with path
/healthand one with/health-insurance. The/health-insuranceitem is standalone, while/healthretains the sub-menu item from #2.
Restore backup.
- Do #1
- Do #2
- Create 2 more panel pages
- /health/xxx
- /health/yyy
- Menu Structure that appears at
/admin/structure/menu/manage/main-menu/health
(Health Insurance)/health(What You Need To Know)/health/xxx/health/yyy
- Delete
/health/xxxand/health/yyyPanel Pages- Menu links are left over in Main Menu
- Reset them
- Resetting causes two additional "Health Insurance" links to appear (totalling 3), each with paths of
/health- No "Delete" or "Reset" links are available for either of the two additional links.
- Do #3
- A 4th "Health Insurance" link appears with path
/health-insurance
And I'll leave it at that.
Comments
Comment #1
merlinofchaos commentedLooks like this is all Drupal core bugs to me. All Panels does is implement hook_menu() and the crashes you're seeing are all in core functions.
Comment #2
bensnyder commentedMoving to core queue.
Comment #3
webchickI think this is the correct title for this issue. If not, please feel free to revise.
Drupal as a whole is not unusable with this problem, so it's not critical. I'm not familiar enough with what Panels does under the hood to discern how we could replicate this problem using just core to get to the bottom of the bug. Hrm. Maybe this will ring a bell with one of the menu system maintainers.
Comment #4
sunThere need to be concrete steps to reproduce this issue - without Panels.
Comment #5
Anonymous (not verified) commentedNo response from OP, closing.
Comment #6
nikita.izotov commentedHad this after moving featire from dev site to prelive on open atrium.
Open atrium Core 7.x-2.30
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'link_path' cannot be null: INSERT INTO {menu_links} (menu_name, plid, link_path, hidden, external, has_children, expanded, weight, module, link_title, options, customized, updated) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => navigation [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 0 [:db_insert_placeholder_7] => 0 [:db_insert_placeholder_8] => menu [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => a:1:{s:5:"alter";b:1;} [:db_insert_placeholder_11] => 0 [:db_insert_placeholder_12] => 0 ) in menu_link_save() (line 3135 of /home/devel/openatrium-nikita/includes/menu.inc).Comment #7
nikita.izotov commentedFixed by removing this "navigation: ---- working group Dafts"(MENU LINKS (263) (menu_links) section) from feature, so problem was just a simple conflict maybe
Comment #8
scottalan commented@nikita.izotov
I'm getting the same error after moving a feature from dev -> stage. Would you mind being a little more specific as to how you fixed this issue? I don't understand what you actually removed in reference to comment #7
Thanks