Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
gmclelland CreditAttribution: gmclelland commentedMore clarification: This doesn't happen when I create a node, but it happens when I:
- view the node
- edit the node
Comment #2
nagy.balint CreditAttribution: nagy.balint commentedHi!
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..
Comment #3
gmclelland CreditAttribution: gmclelland commentedI'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.
Comment #4
nagy.balint CreditAttribution: nagy.balint commentedI 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.
Comment #5
gmclelland CreditAttribution: gmclelland commentedI'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
Comment #6
gmclelland CreditAttribution: gmclelland commentedI 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.
Comment #7
nagy.balint CreditAttribution: nagy.balint commentedSeems 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.
Comment #8
nagy.balint CreditAttribution: nagy.balint commentedIn 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 :(
Comment #9
nagy.balint CreditAttribution: nagy.balint commentedThough 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.
Comment #10
gmclelland CreditAttribution: gmclelland commentedThanks, 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.
Comment #11
gmclelland CreditAttribution: gmclelland commentedAdding the related issue #2460537: Notice: Undefined offset: 3 in _menu_translate()
Comment #12
nagy.balint CreditAttribution: nagy.balint commentedWell, simply having the panels_breadcrumbs enabled does not cause the problem.
There must be some configuration that triggers it...
Comment #13
nagy.balint CreditAttribution: nagy.balint commentedThis 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.
Comment #14
nagy.balint CreditAttribution: nagy.balint commentedIt 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.
Comment #15
gmclelland CreditAttribution: gmclelland commented@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.
Comment #16
capfive CreditAttribution: capfive commented@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!
Comment #17
gmclelland CreditAttribution: gmclelland commented@capfive - The post to follow is #2460537: Notice: Undefined offset: 3 in _menu_translate(). I would recommend reporting your findings there.