Problem/Motivation

During the form alter, simple sitemap first sets up the state, and parses the sitemaps to determine of the content type is used in a sitemap. Only after all this work, does it check if the user has access to edit sitemaps. On a large site, with multiple sitemap variations and a large number of entity types, this can cause an extra second of processing which is unnecessary for anonymous users.

Steps to reproduce

Install simple_sitemap and domain_access modules. Add a few domains and create sitemap variations for the domains.

Proposed resolution

Check permissions before we start handling the entity type and sitemap variations.

Remaining tasks

Review Changes.

User interface changes

None.

API changes

None.

Data model changes

None.

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

richgerdes created an issue. See original summary.

richgerdes’s picture

Status: Active » Needs review

Opened branch and MR.

gbyte’s picture

Category: Bug report » Task

  • gbyte committed 5326f00 on 4.x authored by richgerdes
    Issue #3250675 by gbyte, richgerdes: Form alter triggers sitemap...
gbyte’s picture

Status: Needs review » Fixed

Fair enough, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.