Compatibility with domain module

Created on 3 December 2024, 5 months ago

Problem/Motivation

SiteimproveUrils::getEntityUrls() produces URLs on wrong language and contains twice the domain. Erroneous URL is http://example.comhttps//example.com/my-custom-page.

Steps to reproduce

Not sure about the root cause, but I assume the issue comes with https://www.drupal.org/project/domain module. The site I've faced this does not have submodule domain_access enabled.

Proposed resolution

Use translated entity and do not append the domain to url if its already present.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇫🇮Finland sokru

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

Comments & Activities

  • Issue created by @sokru
  • 🇫🇮Finland sokru

    The patch contains proof-of-concept of the fix, it should be rather safe change.

  • 🇩🇰Denmark beltofte Copenhagen 🇩🇰
  • Assigned to
  • Status changed to Needs review 2 months ago
  • Thanks for working on this. We found one functional issue with the original patch which can lead to an InvalidArgumentException (invalid translation language). This updated version of the patch adds a hasTranslation() check before calling getTranslation(). Cheers!

Production build 0.71.5 2024