Problem/Motivation
makeUrlRelative host-pattern does not anchor to the host boundary, so subdomains and other sites containing the domain string match.
For site domain example.com, the regex built is /example\\.com\\//. Applied as a substring match against the full URL, this matches https://subdomain.example.com/node/42 (host contains example.com/). The URL is treated as local and entity usage for /node/42 is recorded, even though the link points to a different host
Steps to reproduce
Proposed resolution
- Change site_domains config to split out the config into host and path
- Update UrlToEntity to use new config
- Fix old config via an update hook
- Handle IDNs (domains with unicode in them)
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork entity_usage-3603969
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
Comment #3
alexpottComment #4
alexpottComment #5
alexpottWe've got test coverage and all the tasks from the issue summary are covered.
Comment #7
alexpottComment #9
alexpottDue to the config update not going to attempt to fix this on 8.x-2.x.