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
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 #2
guiu.rocafort.ferrerComment #3
guiu.rocafort.ferrerChanging issue priority to Major as per issue priorities
Comment #5
guiu.rocafort.ferrerSteps 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.
Comment #7
idebr commentedNice to fix an issue by removing code, thanks!
Comment #9
webflo commentedComment #10
webflo commentedComment #12
webflo commentedThanks, 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.