Problem/Motivation

When a site has, assume, different 100 menus, /node/add/page can be slowly even if "Administer menus and menu links" permission doen't enabled.

Steps to reproduce

* Create quite a lot of menus, in my case about 250
* Enable "Available menus" for content type and choose all
* Open /node/add/page

Proposed resolution

Check access before generate a list.

User interface changes

No.

API changes

No.

Data model changes

No.

Issue fork drupal-3250678

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Ruslan Piskarov created an issue. See original summary.

larowlan’s picture

Status: Active » Needs work

Doesn't this cause data loss if the field value isn't present?

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)

Triaging my issue queue and this one came up

Also have the same concern as mentioned in #3, the menu key would not be saved to the entity with this change. But also the code has changed since this MR and we now call getMenuLinkContentAccess() so is this still valid?

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Since there's been no follow up going to close out. This does feel like it could cause larger problems. Will save credit for the MR though.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.