I am working on issue 2961459 from country_path module ( https://www.drupal.org/project/country_path/issues/2961459 ).

In the issue, the domain navigation block is not adding the correct country path to the urls. The fix to this involves overriding the setUrl and setPath methods for the Domain entity. The setUrl requires to get the active domain country path, to be able to remove it from the current request and append the target url domain country path. This causes an infinite loop, because calling getActiveDomain loads the domain entity, and since the domain_entity_load calls setUrl for the domain, which in turn, loads the active domain entity again, and calls setUrl, and so on.

Since the getUrl and getPath already manage if the value have been generated or not, i believe there is no point on forcing the setUrl and setPath methods on load, and can be removed safely.

Issue fork domain-3421922

Command icon 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

guiu.rocafort.ferrer created an issue. See original summary.

guiu.rocafort.ferrer’s picture

Status: Active » Needs review
guiu.rocafort.ferrer’s picture

Changing issue priority to Major as per issue priorities

guiu.rocafort.ferrer’s picture

Steps to reproduce:
- Install Country Path 8.x-1.x ( dev branch ).
- Enable Domain and Country Path.
- Go to "/admin/config/domain" and create multiple domains.
- Navigate to the different domains, validate they load properly.
- Apply this patch to the Country path module ( https://www.drupal.org/files/issues/2025-03-14/country-path-domain_domai... ).
- Navigate to any page in any domain. There is an infinite loop and the pages fail to load.

Then, apply the merge request diff ( https://git.drupalcode.org/project/domain/-/merge_requests/135.diff ) to domain module and clear caches. The domains should load properly now.

idebr made their first commit to this issue’s fork.

idebr’s picture

Status: Needs review » Reviewed & tested by the community

Nice to fix an issue by removing code, thanks!

webflo made their first commit to this issue’s fork.

webflo’s picture

webflo’s picture

webflo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, I looked at the current test coverage of this feature. I think its fine to remove the hook. The getter methods work the same as before.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.