I've been adding menu items in main navigation, which included links to custom content as well as pages generated by views. After adding 5th top level menu item all of my buttons got disabled and only Home is now left visible.
Any time I try to enable, I receive message that all is saved, but menu items are still disabled.

CommentFileSizeAuthor
#11 d8db.zip788.31 KBsashkernel
#6 Menus.JPG77.31 KBsashkernel
#5 sshot-2.png3.32 KBhussainweb
#5 sshot-1.png26.25 KBhussainweb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sashkernel created an issue. See original summary.

dawehner’s picture

Thanks for reporting, I'm wondering whether you managed to reproduce the issue and can give a step by step instruction to reproduce it?

sashkernel’s picture

--Edited-- sorry posted to the wrong thread at the beginning.

What I did is created 3 types of content, created 3 views to list that content. Each view was a top level menu item and individual content pages were child menu items.

I have following contributed modules installed:
- Admin Toolbar
- Calendar
- Field Group
- Views Templates

I tried to disable those modules to eliminate any 3rd party bug but they all became grayed out and I can't really do anything with them.

sashkernel’s picture

Just figured out how to disable modules but issue still persists.

hussainweb’s picture

FileSize
26.25 KB
3.32 KB

I am not able to reproduce this. See the screenshots. c1, c2, and c3 are views. They have child links which are content.


sashkernel’s picture

FileSize
77.31 KB

Here's what I have
Departments - View (Lists departments)
-- Finance - Content
Division - View
-- Division 1... - Content

This happened when I tried to add a 3rd view that lists 3rd type of content. I removed it from the menu to see if that was it, but nothing changed. I still cannot enable those menu items.
Menu

hussainweb’s picture

Are the views disabled by any chance?

sashkernel’s picture

views are enabled. Even if they were disabled all child items should be able to be enabled.

sashkernel’s picture

This is my dev site, so I think I should be able to open access to it for you guys to see the problem. Just need to verify some security settings.

PQ’s picture

If you go into the edit page for the link, enable and save it there then does the enabled status stick?

If so then we'd know that it's something to do with the link list UI.

I've had a similar issue on a D7 site which turned out to be caused by PHP's max_input_vars limit being exceeded. Although that was a very large menu, so it's less likely to be this in your case unless your max_input_vars is very low.

sashkernel’s picture

FileSize
788.31 KB

Nope, when editing content and enabling menu there does not do anything.
One thing I noticed: my parent menu items were created manually; I just created a menu item via one of those views and it worked.
I also tried to move child item from disabled menu to the working one; I got successful Saved message, but change did not occur.

I'm uploading DB dump from my D8 test server so you guys could actually reproduce the copy of what I have.

I set login to following
root/password

There is one module active on top of default installation, which is Admin Toolbar.

Hope this helps

Denis Danielyan’s picture

We experienced the same issue here. But only on the staging server (which of course cannot be debugged).
max_input_vars cannot be the issue as it is set to 1000.
It turned out to be that suhosin was active on the staging Server that caused the problem as it chopped off long variable names.

To verify the issue, I created a small php page that prints the $_POST variable (print_r($_POST); die;). Then logged the POST command in Chrome, (network tab, click on preserve log), right click the post command and choose "copy as cURL". Change the URL in the cURL-statement to use the print-php page and verify that the arguments returned are the same that are submitted.

If they are not, your problem is with the webserver.

dawehner’s picture

Thank you for filing this issue.

We experienced the same issue here. But only on the staging server (which of course cannot be debugged).
max_input_vars cannot be the issue as it is set to 1000.
It turned out to be that suhosin was active on the Live Server that caused the problem as it chopped off long variable names.

I hope you haven't yet tried to submit the user permissions form. Suhosin indeed causes often issues in Drupal :(

For comments like #2630776-6: Suhosin causes menu items to be disabled we have another issue already: #2464077: Menu link overrides are lost after cache rebuild.

Denis Danielyan’s picture

We actually had a whole bunch of weird errors reported from the client because of this problem.

To give a future reference to others that have the same problem here a quick recap of which settings changed we changed.

suhosin.request.max_array_index_length
suhosin.post.max_array_index_length
This is for the names. When the names the UUID takes up a major part of the 64 characters that are allowed by default so it was increased to at least 128

suhosin.request.max_varname_length
suhosin.post.max_varname_length
Just to be save, we increased the value from the default 64 to 128

@dawehner:
This was unfortunately a case of "it runs on my machine" and the client ran into it. We're much too happy with config-import/export to make our fingers dirty on the non-dev servers ;-).

cilefen’s picture

Title: Menu items are disabled » Suhosin causes menu items to be disabled
Issue tags: -menu

Version: 8.0.0 » 8.0.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.0.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
catch’s picture

Status: Active » Closed (outdated)
Issue tags: +Bug Smash Initiative

I don't think there's anything that can be done here, additionally suhosin doesn't exist in quite the same way in PHP 8 as far as I know. Closing as outdated.