To reproduce:
Content/Structure/Basic Page -> panelizer tab -> (check) panelize -> (any display) -> (check all) panelize, provide default panel, allow panel choice
Go to admin/structure/types/manage/page/panelizer/default/add
Errors:
Warning: Missing argument 1 for PanelizerEntityNode::get_default_display(), called in /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/export_ui/panelizer_defaults_ui.class.php on line 85 and defined in PanelizerEntityNode->get_default_display() (line 81 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityNode.class.php).
Warning: Missing argument 2 for PanelizerEntityNode::get_default_display(), called in /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/export_ui/panelizer_defaults_ui.class.php on line 85 and defined in PanelizerEntityNode->get_default_display() (line 81 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityNode.class.php).
Notice: Undefined variable: bundle in PanelizerEntityNode->get_default_display() (line 82 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityNode.class.php).
Notice: Undefined variable: view_mode in PanelizerEntityNode->get_default_display() (line 82 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityNode.class.php).
Notice: Undefined index: display in PanelizerEntityDefault->get_default_display() (line 1813 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
Notice: Undefined index: display in PanelizerEntityDefault->get_default_display() (line 1813 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityDefault.class.php).
Notice: Undefined variable: view_mode in PanelizerEntityNode->get_default_display() (line 89 of /mnt/bigdrive/work/builds/drupal-7.15/sites/all/modules/panelizer/plugins/entity/PanelizerEntityNode.class.php)
Comments
Comment #1
caschbre commentedI just experienced the same issue using Panelizer 7.x-3.0-rc1.
Comment #2
jlapp commentedI found that a call to get_default_display() in the panelizer_defaults_ui class was missing the bundle and view mode parameters. I added the parameters, but unfortuately the view mode in that class was incorrect when viewing the page admin/structure/types/manage/page/panelizer/default/add (it was always using "page_manager" even though the view mode in the example URL is "default"). In order to get the correct view mode, I added a $view_mode parameter to panelizer_export_ui_switcher_page() and updated any code that calls it.
Please see the attached patch for my proposed solution to this issue. You'll need to clear your cache after applying the patch, since some hook_menu items have changed.
Comment #3
merlinofchaos commentedChanging panelizer_export_ui_switcher_page is kind of something I want to avoid, because there are multiple places in the system that it's used.
The top level already has an alternate entry function: panelizer_default_list_or_settings_page
I switched things around to use that instead, so we don't have to change the switcher to avoid cascade issues. I had to modify that function to pass the operation through, but that was trivial. I also moved it to panelizer.module to avoid having to load admin.inc for every export ui function.