I maintain a website where a particular content type is always displayed with a left-hand navigation menu present. As part of the process for adding new content of this, the site editors add a link to to the content to the left-hand menu. However, they do not enable this link, although the relevant parent item is enabled. Thus when users visit the content page, the left-hand navigation menu displays just the parent items for the content, with the parent highlighted.

The problem I have is that currently editors are unable to add more links to the left-hand navigation menu. They can navigate to the "Add Link" form for the new item, and can fill it in without difficulty. However, when they click the Save button, the following error message is displayed:

enter image description here

Note that nothing is recorded in the PHP error log when this happens.

However, if they remove an existing link, they can add a link to replace it, suggesting that they have hit an internal limit on the number of links that can be present. The editors believe that they encountered this problem before, when the site was being maintained by a third party external contractor, and that the limit was raised.

I have searched the Drupal 7 documentation, but have been unable to find any indication that there is an upper limit on the number of links a Drupal menu may contain. Searches of StackOverflow and the wider web have been similarly unproductive.

There is nothing in the website's settings.php file that would control the number of items a menu can have. I have checked the Drupal database, but the menu_custom table does not contain any field for maximum items. (I checked the menu_links table, and found that at present there are 1310 items in the left-hand navigation menu, of which 1059 are hidden. Note that not all of the non-hidden items are displayed at once, as the site supports two languages.)

I'd like to know where I can increase the number of items a menu can have, or if this is some kind of fundamental limit, where this is documented, so I can explain the situation to the site owners.

  • This question does not fundamentally explain what actually happens when an editor tries to add one additional menu item. In general, when I hear this I think of drupal.org/project/drupal/issues/1565704 and drupal.org/project/drupal/issues/2742371, but without a precise technical description of the meaning of "unable to add" I am afraid this question is unanswerable in its current form.
    – mona lisa
    Commented Jul 20, 2023 at 15:05
  • Apologies, I've edited the original description now to describe what happens in more detail. Unfortunately the error message itself isn't particularly helpful.
    – user871967
    Commented Jul 20, 2023 at 15:58
  • Understood. You must look harder for some logging on that. It’s a 500 error.
    – mona lisa
    Commented Jul 20, 2023 at 16:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.