I tried updating Panelizer to the latest dev release (2015-Mar-23) and got the following notices when viewing a panelized page:

Notice: Undefined offset: 3 in _menu_translate() (line 777 of /var/www/html/dc/docroot/includes/menu.inc).

Using:
Drupal 7.35
Panels 7.x-3.5
Panels Breadcrumbs 7.x-2.2
Panels Custom Error 7.x-1.0
Panopoly Core 7.x-1.20
Chaos tool suite (ctools) 7.x-1.7

CommentFileSizeAuthor
#9 panelizer-n2460537-9.patch1.05 KBDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SocialNicheGuru’s picture

When I continue to debug the url that is an issue is: node/%/panelizer/overview

the line in question is
$tab_parent_map[$i] = $path_map[$i];
tab_parent_map[3] = overview?

router_item:
Array ( [path] => node/%/panelizer/overview [load_functions] => Array ( [1] => node_load ) [to_arg_functions] => [access_callback] => panelizer_entity_plugin_callback_switcher [access_arguments] => a:5:{i:0;s:4:"node";i:1;s:6:"access";i:2;s:5:"admin";i:3;i:1;i:4;s:8:"overview";} [page_callback] => panelizer_entity_plugin_switcher_page [page_arguments] => a:3:{i:0;s:4:"node";i:1;s:8:"overview";i:2;i:1;} [delivery_callback] => [fit] => 11 [number_parts] => 4 [context] => 1 [tab_parent] => node/%/panelizer [tab_root] => node/% [title] => Overview [title_callback] => t [title_arguments] => [theme_callback] => [theme_arguments] => a:0:{} [type] => 140 [description] => [position] => [weight] => -10 [include_file] => )

router_item['number_parts'] = 4

Array
(
[0] => Array
(
[file] => d7/includes/menu.inc
[line] => 1964
[function] => _menu_translate
[args] => Array
(
[0] => Array
(
[path] => node/%/panelizer/overview
[load_functions] => Array
(
[1] => node_load
)

[to_arg_functions] =>
[access_callback] => panelizer_entity_plugin_callback_switcher
[access_arguments] => a:5:{i:0;s:4:"node";i:1;s:6:"access";i:2;s:5:"admin";i:3;i:1;i:4;s:8:"overview";}
[page_callback] => panelizer_entity_plugin_switcher_page
[page_arguments] => a:3:{i:0;s:4:"node";i:1;s:8:"overview";i:2;i:1;}
[delivery_callback] =>
[fit] => 11
[number_parts] => 4
[context] => 1
[tab_parent] => node/%/panelizer
[tab_root] => node/%
[title] => Overview
[title_callback] => t
[title_arguments] =>
[theme_callback] =>
[theme_arguments] => a:0:{}
[type] => 140
[description] =>
[position] =>
[weight] => -10
[include_file] =>
)

[1] => Array
(
[0] => node
[1] => 40
)

[2] => 1
)

)

DamienMcKenna’s picture

Having trouble recreating this.

gmclelland’s picture

I just ran into this issue as well when upgrading the latest Panelizer-3.x-dev. See #2466919: Notice: Undefined offset: 3 in _menu_translate() for more information.

Panelizer and Panels Breadcrumbs are installed and enabled, but not configured.

gmclelland’s picture

The problem seems to be caused by this commit http://cgit.drupalcode.org/panelizer/commit/?id=7f286571aa468012c6e04e61...

If I try the commit before that one the errors go away.

Hope that helps

DamienMcKenna’s picture

@gmclelland: I put some time into this last week and wasn't able to reproduce the problem.

gmclelland’s picture

@DamienMcKenna - I was able to reproduce the errors on simplytest.me by adding Panelizer 3.x-dev, Panels, ctools, Panels Breadcrumbs.

- Enable the modules.
- Create an article
- View the article (errors are displayed)

DamienMcKenna’s picture

I've confirmed this - once I enabled the Panels Breadcrumb module the error started showing.

DamienMcKenna’s picture

For some reason having the "$this->plugin['entity path'] . '/revisions/%/panelizer/' . $view_mode . '/content'" menu path set to be a MENU_DEFAULT_LOCAL_TASK triggers the error.

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.05 KB

Can someone please test this?

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

  • DamienMcKenna committed 1ca08ff on 7.x-3.x
    Issue #2460537 by DamienMcKenna: Fixed "Notice: Undefined offset: 3 in...
gmclelland’s picture

Thanks @DamienMcKenna, that made the errors go away!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gmclelland’s picture

Status: Closed (fixed) » Needs work

Sorry, I have to reopen this.

Even with the latest Panelizer dev, I just noticed the same error displaying now at /admin/structure/file-types when using the Media and File Entity 2.x-dev modules.

This can be seen in http://simplytest.me/project/media_dev/7.x-2.x or http://simplytest.me/project/commons/7.x-3.x

lwalley’s picture

The error on File Entity list page appears to be related to PanelizerEntityFile setting $entity_admin_root to admin/structure/file-types/% whereas PanelizerEntityDefault indicates that it should be something like admin/structure/file-types/manage/%. File Entity added Panels/Panelizer support in issue #1564456: Provide support for Page manager, Panels, and Panelizer.

gmclelland’s picture

Status: Needs work » Fixed

Thanks @lwalley. Setting this issue back to "Fixed". I will open a new issue with a patch in the file entity's issue queue.

gmclelland’s picture

Here's the new File Entity issue I created if interested #2533816: Notice: Undefined offset: 3 in _menu_translate()

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.