User paths on US domain with domain module

Created on 19 March 2021, over 3 years ago
Updated 29 March 2023, about 1 year ago

Problem/Motivation

Using domain_config_ui (part of Domain Access β†’ I'm running into the error Unrouted URIs do not have internal representations. It's from a change from this β†’ issue that has highlighted a wider issue.

The regex in \Drupal\country_path\HttpKernel\CountryPathProcessor::processInbound() isn't very strict and so the Url creation in domain_config_ui_path_is_registered() leads to /user/1/edit being transformed to er/1/edit and therefore is invalid when getInternalPath() is called.

Steps to reproduce

  • Using latest version of domain module (beta 5 currently), with domain_config_ui enabled
  • Set up a domain with country path prefix 'us'
  • Navigate to /us/user/1/edit (or any /user page)

I also think it's more easily reproduced as follows, without the need for domain_config_ui_path_is_registered.

  • Set up a domain with country path prefix 'us', and set as default domain
  • Navigate to /user

Proposed resolution

Make the regex stricter, while also accounting for the homepage.

Remaining tasks

Review & tests.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Closed: duplicate

Version

1.4

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom kimberleycgm

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

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.69.0 2024