I'm seeing a bunch of menu-related errors when using drush site-install to install Panopoly non-interactively. They don't seem to affect the functioning of the site. This is happening both on Travis (sample output below) and on my local machine.
I don't see these errors when I use a similar command to install my child distribution, which doesn't use panopoly_demo, panopoly_admin, or panopoly_pages. Not sure if that's a clue to their source or not.
drush si panopoly --db-url=mysql://root:@127.0.0.1/drupal --account-name=admin --account-pass=admin --site-mail=admin@example.com --site-name=Panopoly --yes
You are about to DROP all tables in your 'drupal' database. Do you want to continue? (y/n): y
No tables to drop. [ok]
Starting Drupal installation. This takes a few seconds ... [ok]
WD menu_block: Menu block ctools-main-menu-1 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
WD menu_block: Menu block ctools-main-menu-2 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
WD menu_block: Menu block ctools-main-menu-3 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
WD menu_block: Menu block ctools-main-menu-4 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
Installation complete. User name: admin User password: admin [ok]
Updates downloaded successfully. [status]
WD menu_block: Menu block ctools-main-menu-5 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
WD menu_block: Menu block ctools-main-menu-6 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
WD menu_block: Menu block ctools-main-menu-7 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
WD menu_block: Menu block ctools-main-menu-8 is set to use parent [error]
menu link main-menu:0 but the menu link was not loadable or does not
exist.
Comments
Comment #1
cboyden commentedComment #2
omega8cc commentedThis 'breaks' Panopoly installation also in Aegir. While it seems to be mostly cosmetic problem, because the site is installed, the task is marked as broken because there are these errors reported.
Comment #3
dsnopekHrm. I install via Aegir but not the latest version. However, if it's breaking newer Aegir's then this is important! Adding to the sprint board - we can try and tackle this at the July 11th sprint.
Comment #4
omega8cc commentedWhile I'm not sure if this makes any difference, the BOA specific Aegir setup is based on Drush 7.0-rc2, Provision 3.x and Hostmaster 2.x
Comment #5
dsnopekComment #6
dsnopekComment #7
boabjohn commentedJust adding in that we are finding watchdog completely swamped with these log messages: 10 pages of entries within a couple of hours:
Menu block ctools-main-menu-1 is set to use parent menu link main-menu:main-menu:0 but the menu link was not loadable or does not exist.This is on latest Panopoly distro through Pantheon, nothing weirdly patched and no Aegir to blame. All Panopoly_* modules are ON except for Magic and Example Content.
Comment #8
dsnopekSo, I did a little more testing. I think this is either (a) a menu_block bug or (b) a problem in our Panelizer default for "Content Page", because I see the warning appearing in watchdog everytime I visit an "Content Page". It's probably importing the data in panopoly_demo that's making it appear during install.
Comment #9
cboyden commentedI also see the error every time cron runs.
Comment #10
jfrederick commentedHere are two patches: one for panopoly_pages, and a corresponding one for panopoly_test. Let me know if it's better to somehow combine them into one?
If you use the menu_block configuration form to select a parent menu item, then the select list value is in the form [menu-name:menu-link-id], such as main-menu:1123. If you select a top-level menu item that has no menu link ID, then the select list value is in the form [menu-name:0].
Either way, in the submit function
menu_block_menu_tree_content_type_edit_form_submit(), the select list value is exploded on the colon, and only the mlid integer is stored as the parent_mlid. But in the panopoly_pages Feature, the parent_mlid was being stored as the full string main-menu:0, which the functionmenu_tree_block_data()will reject and log the reported messages.So I updated the Feature and the test to store only the mlid integer (0) part of the link.
Comment #11
dsnopek@jfrederick is my hero! :-)
Doing two patches like this is perfect. You even named them correctly for our script that runs patches on Travis to pick them up! And here is the Travis build:
https://travis-ci.org/panopoly/panopoly/builds/71603425
It'll do the install relatively early on in the process.
However, these changes worked for me locally when viewing a "Content Page" that wasn't customized per-node. Unfortunately, if the user customized the page, the menu block settings will be saved in the database, so the error will keep happening. Which means this'll need a
hook_update_N(). :-/We've done update functions that changes the settings for every instance of a particular type of pane before, for example,
panopoly_widgets_update_7012(). Using that as an example, this should be relatively easy to write.Anyway, thanks again for figuring this out!
Comment #12
dsnopekHere's a new panopoly_pages patch with an update hook! It works in my limited testing locally, but I'd love some additional review/testing.
We don't need to worry about an update hook for panopoly_test, because it's just used for running the automated tests - there will be no real user data using those content types.
EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/71643194
Comment #13
jfrederick commentedThe patch in #12 worked in my testing!
Comment #15
dsnopekThanks! Committed. :-)