I am creating a panel which contains blocks, and which also has two sub-views, like this:

1. meeting/2011 (the panel page)
2a. meeting/2011/schedule (a view)
2b. meeting/2011/papers (another view)

When I visit any of these three pages, to tabs appear: Schedule and Papers. As expected.

I then decided I needed a tab that corresponded to level 1, which I did without error in 6.x. When I create a 'Default Menu Tab', and under 'Parent" select "normal Parent item", I get the following error (repeated multiple times) on all three pages:
Notice: Undefined offset: 1 in _menu_translate() (line 768 of /local/Sites/acq-dpl/drupal-7.2/includes/menu.inc).
In addition, the new (lvl 1) tab does not appear. Any other combination removes all tabs.

Is this an error in the code?
Is there some other way to do what I am trying to do?

Thanks,
Maria

Comments

mariagwyn’s picture

I also tried something similar using views only. the same error appears when I try to create a tab for the first level, so this isn't really a panels issue. Not sure what issue it is unless it is menus itself. sigh.

Sdhooge’s picture

I've got the same error with Views 7x3rc1. And only when I select Menu: default menu tab. Any other option of the menu doesn't generate the error (I have tested all of them). Not so good for a live website :-(

Letharion’s picture

Title: When creating parent tab menu: Error: Undefined offset: 1 in _menu_translate() » Both Panels and Views fails to create parent tab menu: Error: Undefined offset: 1 in _menu_translate()
Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.0-alpha3 » 7.x-1.x-dev
Component: Panel pages » Code
Status: Active » Postponed (maintainer needs more info)

Since it affects both Views and Panels I'm guessing it's a Ctools issue. Someone with this problem will need to provide an export of something that can reproduce the problem.

merlinofchaos’s picture

Views has its own menu handling code unrelated.

Drupal's menu system is really picky about tabs and IMO the _menu_translate() error is a bug in core which can happen if the configuration is incorrect.

Unfortunately, the initial issue does not say which path the 'default menu tab' was created at, and that must be handled very carefully. We need this information to proceed.

sebastianSue’s picture

Status: Postponed (maintainer needs more info) » Needs review

For Views 7.x-3.0-rc3, and Panels 7.x-3.0-alpha3, I added a panel for <front> which caused this error.

merlinofchaos’s picture

Status: Needs review » Postponed (maintainer needs more info)

Please read the link about 'status' values before setting them.

<front> is not a valid path for a panel.

Note that in the first example, the path for the 'default' tab should be something like meeting/2011/default and meeting/2011 will automatically be created along with it when you make it a 'default tab'.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)