Not sure if this has already been raised - issue search bombed out every time - I imagine it could be a duplicate as it is rather basic.

Issue:
Children of top level Main Menu items appear correctly in the hierarchy displayed in the Structure >> Menus >> Main Navigation >> List Links but do not get printed in the html generated for the Main Menu.

Expected behaviour:
As Drupal 7. Child menus are printed as second level submenus of top-level main menu. (See Drupal 7.png)

Actual behaviour:
Only the top level main menu items' html are printed even though List Links shows them correctly. (See Drupal 8.png)

Steps to reproduce:

  1. Create a Basic Page with Main Menu Item "First Basic Page"
  2. Create another Basic Page with Menu item whose parent is First Basic Page
  3. Look at Structure >> Menus >> Main Navigation >> List Links
  4. Look at generated html with Stark theme

M
Note:
Although a manually-created menu can create the hierarchy of li's correctly (where the Main menu does not), it should be noted that even the manually-created menu top-level cannot seemingly be set "expanded" as in Drupal 7, thus the submenus' html is not printed until the parent li/ a is clicked.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iainH’s picture

Issue summary: View changes
iainH’s picture

Issue summary: View changes
iainH’s picture

I see that https://www.drupal.org/node/2256521 is going to change everything! I'll leave this issue open, though as It will be useful to track the keenly anticipated and refactored menu system and hopefully I can document how to use it to achieve this simple task.

yoroy’s picture

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

.

stevesmename’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +Needs documentation

This is resolved by configuring the block settings of "Main navigation" or any other menu settings for the Block Plugin. The default setting for "Maximum number of menu levels to display" is set to "1". Change this setting to "Unlimited" to see children displayed.

Tagging this issue with possible "needs documentation", otherwise it's considered Fixed.

stevesmename’s picture

Component: menu.module » documentation
stevesmename’s picture

Component: documentation » system.module
Category: Bug report » Support request
Priority: Major » Normal
Status: Needs review » Needs work

All I think is required is finding where the documentation is to override the default configuration for 'depth' in SystemMenuBlock. Best link found is below but maybe someone else has a better link for documentation purposes.

https://api.drupal.org/api/drupal/core!modules!system!src!Plugin!Block!S...

stevesmename’s picture

Component: system.module » configuration system
mtift’s picture

Component: configuration system » menu system
hitetlen’s picture

This bug is still not fixed. That is true, that I can set maximum number of menu levels to display in main nav block settings, but child menu links are only visible, when I click on the parent menu link.

Update:

Okay, I finally found the solution. On main menu settings page, it needs to be checked the "Show as expanded" checkbox.

hitetlen’s picture

chadmandoo’s picture

Step #11 works as intended. This is not very obvious but I can confirm that you need to go to the links and check show as expanded.

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

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

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

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

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

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

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

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

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

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

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

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

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

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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.8.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. 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
cilefen’s picture

Status: Needs work » Closed (outdated)

I am closing this support request because there have been no recent comments.

The Drupal Core issue queue is not the ideal place for support requests. Consider other sources of support.

If documentation is in fact needed open a documentation task issue.