I was just updating a site to test the latest dev and after updating I'm presented with the following when I view a node page:

Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 777 of /Users/glenn/websites/scald/includes/menu.inc).
Notice: Undefined offset: 3 in _menu_translate() (line 783 of /Users/glenn/websites/scald/includes/menu.inc).

Note: I don't see this when I edit a node. I have cleared the caches and ran update.php.

Just thought I would report this before a new release was made.

Comments

gmclelland’s picture

More clarification: This doesn't happen when I create a node, but it happens when I:
- view the node
- edit the node

nagy.balint’s picture

Hi!

Thanks for the report.

Can you provide more information on how your node is built? What is on the page that causes the issue, what is the 3 in the message (is it a node id?), multilanguage settings etc..

gmclelland’s picture

I'm not sure about the "3." The node is node/7/edit

This is a very basic test site for testing scald. It is not multilingual. I noticed it happens on basic pages and article content types. The site is running on Drupal 7.34 with all the modules running the latest dev releases.

nagy.balint’s picture

I have read up on it since.
The 3 is the placeholder of the menu link. Like the 3rd placeholder.
And the issue is that the system runs out of items to put into the 3rd placeholder for that link.

Its however weird that you had the issue after updating, as we have not touched the menu definitions for a while.

I cant reproduce it on my site, so i can try on simplytestme, however not sure i will have the correct modules installed, or the correct CT configuration.

gmclelland’s picture

I'm not sure why, but it looks like the lastest dev of Panelizer might be causing the problem. When I disable the module, the errors go away. When I enable it, the errors return.

Hope that helps

gmclelland’s picture

I tried on simplytest.me with Scald Galaxy and didn't see the errors.

But I also didn't have Panelizer on simplytest.me when I tested.

nagy.balint’s picture

Seems like i cant reproduce it with panelizer either :(

The issue is that i would not like to simply change all MENU_LOCAL_TASK to CALLBACK, and without reproducing its hard to see which one is faulty :( Or maybe another module is faulty.

nagy.balint’s picture

In Scald module:
Try changing:
'type' => MENU_LOCAL_TASK,
to
'type' => MENU_CALLBACK,

For
$items['atom/%scald_atom/edit'] = array(
and
$items['atom/%scald_atom/delete'] = array(

See if that does anything.

Though i still dont know why i cant reproduce :(

nagy.balint’s picture

Though if we do that then the edit and delete tabs are gone from the atom view page.
So likely we cannot do it here...

But anyways worth a try.

gmclelland’s picture

Thanks, I tried it, but it didn't make any difference.

The problem is somehow related to the https://www.drupal.org/project/panelizer and https://www.drupal.org/project/panels_breadcrumbs modules. If both modules are enabled, I see the errors.

gmclelland’s picture

nagy.balint’s picture

Well, simply having the panels_breadcrumbs enabled does not cause the problem.

There must be some configuration that triggers it...

nagy.balint’s picture

This is interesting: https://www.drupal.org/node/1108314
And has the core patch to remove the notices.

Maybe the issue is that somewhere the menu items are defined incorrectly, they are overlapping maybe and confuses Drupal.

nagy.balint’s picture

It would be nice if you could do a backtrace where the error occurs, so we know which menu definition causes the trouble for you.
Then maybe we can see why. It seems to me that somewhere there is a local task that has a wildcard which should not be there.

gmclelland’s picture

Status: Active » Closed (fixed)

@nagy.balint - Thanks for all your help. I'm not sure of the solution yet, but I think the problem is caused by this commit in Panelizer http://cgit.drupalcode.org/panelizer/commit/?id=7f286571aa468012c6e04e61...

I'll close this issue and report the other details in the Panelizer issue.

capfive’s picture

@gmclelland --> #15

this worked for me! rolled back my panelizer update and it fixed the issue, will check if there is an issue post about it and if not will start one!

good find!

gmclelland’s picture

@capfive - The post to follow is #2460537: Notice: Undefined offset: 3 in _menu_translate(). I would recommend reporting your findings there.