All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: Enabling “Hide the prefix for default language” stops switcher from working

Status Resolved
Add-on / Version Publisher 1.6.12
Severity
EE Version 2.11.2

Mark Simons

Jun 12, 2016

Description:
When enabling “Hide the prefix for default language?” the language switcher does not work, I have English and Arabic languages set up but once i switch to arabic I cannot switch back, it just reloads the page with no url change.

My language switcher code for reference:

{exp:publisher:languages}
{long_name} |
{/exp:publisher:languages}

My CP settings:
Enable URL translations? No
Add URL prefix? Yes
Add URL prefix to the homepage? No
Hide the prefix for default language? Yes

Detailed steps to reproduce the issue:
1.switch to arabic
2. try and switch back

#1

BoldMinded (Brian)

Are you using {translated_url} or {switch_language_url} variable in your languages loop?

#2

BoldMinded (Brian)

Make sure you are using {switch_language_url}

#3

Mark Simons

The code I am using is this… Sorry didn’t work when tried above.

{exp:publisher:languages}
<a href="http://{switch_language_url}" class="is{is_active}">{long_name}</a> <span class="{short_name}">|</span> 
{/exp:publisher:languages}
#4

Mark Simons

Comment has been marked private.

#5

BoldMinded (Brian)

What other add-ons do you have installed? It works for me locally using {switch_language_url} and {translated_url} as the link value.

#6

Mark Simons

{translated_url} kind of works, but when switching between languages it becomes domain.com/ar/ar/ar/ar etc..

Modules: Solspace calendar Channel Images Wygwam Matrix SEO Lite Zoo triggers (disabled) Zoo Flexible Admin (Disabled) Structure

EE version 2.11.2

#7

Mark Simons

Comment has been marked private.

#8

BoldMinded (Brian)

Since this is something I can’t reproduce locally I’ll need to to setup a EE environment with only publisher installed to recreate the issue. I can login to that environment when it is ready.

#9

Mark Simons

Comment has been marked private.

#10

BoldMinded (Brian)

You could try using ?lang_id=x and hard coding the links.

Login to reply