The module does not work with sites which use multilingual domains.
The generated url needs to enforce relative urls rather than assume it's always relative..
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | indicator-use-relative-url-3065135-4.patch | 1.04 KB | pierrelbz |
| #3 | environment_indicator-use-relative-url-3065135-3.patch | 1.05 KB | floydm |
Issue fork environment_indicator-3065135
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
codebymikey commentedComment #3
floydm commentedThanks for this patch! It works as expected. The only issue I had was that composer couldn't apply it against 8.x-3.7. I'm not sure if that is because of changes between 8.x-3.6 and 8.x-3.7 or because the patch header is a bit unusual. Regardless, attached is a reroll of this change that composer applies successfully.
Comment #4
floydm commentedComment #5
pierrelbzThanks for te patch
works as expected
Reroll for v4.0.3
Comment #8
trackleft2Added a merge request that rerolls this for 4.x (4.19).
Comment #9
tessa bakkerMR 56 needs work, the new url contains a double forward slash '/', one for the domain, one for the beginning of the path.
Comment #10
yevko commentedFor me MR 56 works well, with the domain-based language negotiation. No extra slashes. But the language support does not work in this case anyway, e.g. having local at
https://domain-en.localand corresponding prod's domain athttps://www.domain.comthere is no way to redirect fromhttps://domain-fi.localtohttps://www.domain.fiI also think that https://www.drupal.org/project/environment_indicator/issues/3092900 is a duplicate of this issue, since the problem reported there is fixed by this patch.
Comment #11
trackleft2@yevko, please mark as reviewed and tested if you are sure about your testing.
@tess bakker we might need an issue about trimming the input to remove any slashes, and possibly a post_update.php implementation to update config for any sites who might have a trailing slash.
Comment #12
trackleft2Comment #13
trackleft2@tess bakker I've updated #3425491: Hostname field isn't a hostname but a base URL to include form validation that determines whether the user has added a trailing slash.
Additionally, I've added a database update in the merge request, that fixes any urls in configuration that happen to have a trailing slash. Please review, and mark this as RTBC and possibly that issue too if you can.
Comment #15
trackleft2Comment #25
trackleft2Fixed in 4.x to be released in 4.0.22 #3483897: [META] Release Plan for Environment Indicator Patch Release 4.0.22