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: Language drop-down menu not working reliably

Status Resolved
Add-on / Version Publisher 3.9.1
Severity
EE Version 6.4.6

Gavin @ JCOGS

Mar 22, 2023

We have a drop-down menu on the site using this code to switch between the three languages used on the site:

<ul class="submenu">
            {exp:publisher:languages}
                <li menuitem itemscope itemtype="http://schema.org/SiteNavigationElement">
                    <a itemprop="url" href="{switch_language_url}">{long_name}{if '{is_active}' != ''} ✔︎{/if}</a>
                </li>
            {/exp:publisher:languages}
            </ul>

It used to work fine, but now is not working all the time - on some pages you can switch between the default language and one of the other languages, but not to the other, on other pages it doesn’t work at all (whatever you choose you just get the default language).
Adding the language slug to the URL works 100% of the time, so the issue is not with the language side itself, just this switching activity.
Grateful for any thoughts / guidance you can give etc.

#1

BoldMinded (Brian)

Can you walk me through what this looks like… a video might help. Also, what are your URL Translation settings in Publisher set to?

#2

BoldMinded (Brian)

Comment has been marked private.

#3

BoldMinded (Brian)

Thanks for the video. I was trying to login to the CP to take a look at the Publisher settings but there is no password for the user in the ticket :(

#4

BoldMinded (Brian)

I think this was an easy one. You had the Add URL Prefix setting turned on, but you’re not actually using prefixes in the navigation (not sure how you’re rendering the nav tbh). Once I turned that setting off the switching seemed to work fine.

#5

Gavin @ JCOGS

Comment has been marked private.

#6

BoldMinded (Brian)

Honestly I haven’t changed anything with how the URLs work in ages, so no recent builds are going to change that behavior. I also don’t know how you’re building your navigation, or what possible redirects, if any, that you have in place on the server. Does your {site_url} variable contain the language code segment?

#7

BoldMinded (Brian)

Gavin, I’m going to close this b/c I haven’t heard anything since my last comment. If you can provide more information feel free to re-open the ticket.

Login to reply