Language switcher malfunction

OJS 3.4 is experiencing a language switcher malfunction. The system becomes unresponsive after switching the language two times. To restore functionality, the browser history must be cleared.

OJS 3.4.0.7

Hi @gdlenne,

Interesting… anything in your PHP error logs? That might provide more clues around this.

-Roger
PKP Team

No, there is no errors in the log.
I have two languages, Swedish and English. Lets say I start in the Swedish language and then click to change to English (works fine) and then back to Swedish (works fine). If I then wnat to go back to Enlish again, thats not possible. I have to clear the history to make it work again.

We are on OJS 3.4.0-5 and have a journal with seven languages in the GUI (de,en,es,fr_FR,it,pt_PT, ro). We can’t reproduce what you observed, neither in the frontend nor in the backend.
Can you reproduce in a different browser? Maybe it is something browser specific.

Thanks for Your answer.
I got the same problem with Firefox.
I´m on 3.4.0.7 but I had the same problem with 3.4.0.5

I have 2 languages, Swedish and English.
I start in the Swedish language and then click to change to English (works fine) and then back to Swedish (works fine). If I then wnat to go back to Enlish again, thats not possible. I have to clear the history to make it work again.

Please provide a link to the journal.

https://publications.sccl.se/

It’s not a malfunction. Your wrong assumption is that the language switcher is a toggle. It isn’t.
You need to display two menu entries, for each GUI language one.

E.g. for the switch to English, you create a menu entry such as:

Remote URL
In the title field, you fill in the subfields with all translations for English (one english, one swedish)
In the URL field, you fill in all the subfields always the same URL, that switches to the English GUI

Create the same for Swedish.

Place both menu entries into the User or Primary menu.

Hi,
Thats exactly what I have done.
Thank you for your response, but that´s what I have done. I’m using the “Default” template. I’ve also tried the “Classic” template and used the built-in language selector, with the same result. So, it doesn’t work after the second time.

Could I have missed a setting in the config file?

No, I just see just one language menu entry on your journal, not two. See for example here: https://sui-generis.ch (on the top, DE and FR).

What I have is just one but I have the translation so it becomes the same as two entries, check it out. I tried two entries as you suggested, but with the same result.

Ok, then I think it is a problem of the caching of the web server of your installation.

When I switch to the archive page and do the language switch four times, it won’t work the fourth time.
When I then go the home page of the journal and click the language switch, I land on the archive page. However, I should land on the translated home page.

Thank you very much for your commitment!

I’ve now spent 2 hours with the server guy and we can’t find any errors. No errors in the log and he can’t see any settings that are incorrect. You’re right that it feels like there’s something wrong with the cache.

I haven’t made any changes to the config file regarding cookie or cache settings.

COOKIE
session_cookie_name = SCCLSID
session_lifetime = 30
session_samesite = Lax

CACHE
object_cache = none

memcache_hostname = localhost
memcache_port = 11211

web_cache = off
web_cache_hours = 1

I only have one Journal on the domain.
One question is in the admin under Administration / Journals on this website, under edit SCCL Publications, there is a path to the journal that must be filled in. There I write sccl. This makes the journal have the URL .https://publications.sccl.se/index.php/sccl/.
Can you set it in the config so that you get the URL only https://publications.sccl.se
I have in the config base_url = “https://publications.sccl.se