Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Entering URL directory will ignore the language set by the Switch Language URL
Status | Resolved |
Add-on / Version | Publisher 2.10.6 |
Severity | |
EE Version | 4.3.8 |
Hop Studios
Feb 28, 2019Please take a look at this testing site.
http://ee4.hopexperiment.com/testing/switch_translate_url
Switch to es using the link on top
then manually enter http://ee4.hopexperiment.com/testing/switch_translate_url in the url and you will see a brief redirect error before going to the page.
But I think Publisher should redirect to http://ee4.hopexperiment.com/es/testing/switch_translate_url since we change the language with the switch_language_url?
BoldMinded (Brian)
So, setting the Redirect Type in the Miscellaneous Settings to 302 corrects the issue. Fortunately, I can replicate this locally in my dev environment when I set the redirect method to 301 and have the same URL Translation settings that you do.
BoldMinded (Brian)
Comment has been marked private.
Hop Studios
Hello Brian,
I tried your build and the redirect too many times error is now gone. However, I still want to verify with you to see if this is the expected outcome. Let’s say I have a hard coded a tag with href=”/testing/iframe” on this page http://ee4.hopexperiment.com/testing/switch_translate_url. If I switch the language by clicking {switch_language_url} I get taken to http://ee4.hopexperiment.com/es/testing/switch_translate_url. Then if I click that a tag, I go back to the en version (without the language prefix). Shouldn’t it be automatically redirected to the es url?
BoldMinded (Brian)
Yeah, that’s the expected outcome. You’ve defined not to show the default language code in the url, so going to a url without the language code means it’s going to set the site to the default language.
Hop Studios
I guess I just misunderstood the concept. What’s the major difference between switch_language_url vs translated_url? I always thought that the switch_language_url saves a session or cookie to force redirect to the switched language if the language prefix in the url does not match the set language.
BoldMinded (Brian)
If you want to explicitly change languages, then I’d recommend using switch_language_url. translated_url is more for use when you’re listing all the languages, such as in meta data tags to list alternate versions of content, e.g.
Hop Studios
Sounds good. This can be closed 😊