Problem/Motivation
I am getting entity URL by programatically setting the domain.
Steps to reproduce
Create two domains called us, ca.
US domain - example.com/us
Ca domain - example.com/ca
I am using country path module for domain prefix.
Node 1 is associated in US, CA.
Set the domain programatically and get the entity URL using $entity->toUrl(); Now Url object doesn't changing the based on the domain.
What I am expecting.
So when load node 1 URL in code, I am expecting below output.
1. /us/node/1 - For US domain.
2. /ca/node/1 - For CA domain.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | active_domain-3175755-8.patch | 751 bytes | trishen |
Issue fork country_path-3175755
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:
- 8.x-1.x
changes, plain diff MR !28
- 3175755-paths-not-set
changes, plain diff MR !27
Comments
Comment #2
iyyappan.govindComment #3
iyyappan.govindComment #4
agentrickardComment #5
agentrickardHow are you trying to Set the domain programatically?
This may be a country path issue.
Comment #6
iyyappan.govindHi
I am trying to set the domain like below.
Thanks
Comment #7
agentrickardRe-filing to Country Path.
Comment #8
trishen commented@iyyappan.govind
with this patch, you can set domain as URL option
Comment #9
trishen commentedComment #10
d.fisher commentedThe patch no longer applies. Going to create a branch and merge request.
Comment #14
d.fisher commentedHere is an updated remote patch URL for testing:
https://git.drupalcode.org/project/country_path/-/merge_requests/28.patch
Comment #15
d.fisher commentedTested the merge request and it applies cleanly and continues to solve this issue. Would be good to get this one across the line after 5 years of being in 'needs review'. Can we get another +1 for RTBC?
Comment #16
d.fisher commentedMR!28 is working well for our use case and I'd be keen to move this issue along if it's working for others too. Any chance we can get a +1 for RTBC from @iyyappan.govind, @agentrickard, or @trishen?
Comment #17
trishen commentedReviewed
Comment #18
d.fisher commentedOk let's get this one merged.
Comment #20
d.fisher commented