Wrong content can be returned for a path

Created on 17 March 2025, 2 months ago

Problem/Motivation

If you have 3 pages, and each page has the same path for different domains, the bug is not visible. However, if you delete two of those nodes, you will incorrectly retrieve content from the first returned record in the database.

Steps to reproduce

Create a few pages for different domains with the same URL. See that their contents are different. Now delete one and try to access it on that domain - you will see content from another domain.

Proposed resolution

Rework the DomainUniquePathAliasManager::getPathByAlias method to do the following:

  • Remove the call to $this->inner->getPathByAlias().
  • If no paths were found, load the domain configuration for that domain id, and return its configured 404 page and return that path.
  • If no domain config was found, load and return the 404 page for All Domains.
  • If that doesn't exist, consider an exception or some other means of handling it.

When no domain path is found, it calls the inner service which is what returns the first thing it finds by path even for a domain it is not assigned to.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kevinquillen

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024