Form alter triggers sitemap processing even if the user can't edit sitemaps

Created on 22 November 2021, about 3 years ago
Updated 19 July 2024, 5 months ago

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.

πŸ“Œ Task
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024