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: Wrong redirect using language switcher
Status | Resolved |
Add-on / Version | Publisher 1.5.9 |
Severity | Trivial |
EE Version | 2.9.2 |
LouWii D.
Dec 08, 2014Hi,
I’m facing a bug that I managed to fix.
When using the language switcher, I had a wrong redirection on pages like
/my_page
/different_page
/another_page
where the segment is actually a template group.
When viewing default language (for instance /my_page) and clicking on an other language on the switcher (to see italian version of /my_page), it works fine.
But when viewing a translated version (/es/my_page) and clicking on an other language, it redirects me to /fr or /it instead of /fr/my_page or /it/my_page
I manage to find the bug into the code.
publisher/libraries/Publisher/helpers/Publisher_helper_url.php, line 831, ee()->uri->segments is returning an empty array. I don’t know why.
I added
if(empty($segments))
{
$segments = $this->get_current_segments(FALSE, FALSE);
}
on line 832 so we are sure to continue the script with the correct URL segments. That does the trick.
I thought I’ll let you know.
BoldMinded (Brian)
Thanks for the report. This sounds a lot like something I’ve fixed for an upcoming release, so I’ll compare to the change you submitted.
BoldMinded (Brian)
This should be fixed in 1.6.1. Closing.