Remove domain_entity_load hook from module

Created on 16 February 2024, 4 months ago
Updated 12 March 2024, 4 months 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 review ).

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

Needs review

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

Comments & Activities

Production build 0.69.0 2024