Remove domain_entity_load hook from module

Created on 16 February 2024, about 1 year ago

I am working on issue 2961459 from country_path module ( https://www.drupal.org/project/country_path/issues/2961459 🐛 Country path not managed in domain navigation block Needs work ).

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.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇪🇸Spain guiu.rocafort.ferrer Barcelona

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024