Problem with Joomla language switch only on start/homepage link

General questions regarding the use of languages in Joomla! 3.x.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
insightout
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Dec 12, 2010 8:57 am

Problem with Joomla language switch only on start/homepage link

Post by insightout » Sat Sep 01, 2018 7:55 am

I've been using Joomla for my website for years and I just noticed that I have a problem when switching the language of the start / homepage that loads when someone just access the url of my website and directly tries to switch the language. All other articles and menues switch the language correctly it is only for the start / homepage that I have this problem.

When I am accessing the website through the direct url plus a language selection, e.g.:

https://www.matrixwissen.de/index.php?lang=de

https://www.matrixwissen.de/index.php?lang=en

everything is ok. It is only when I access the German version and then click on the flag to switch to the English version and vice versa that I have a problem:

I am using Article -> Features Articles as home page where I have a long list of about 40 articles. Only the first 14 are shown when I access the URL so there are more which I can access through the (1) (2) buttoms at the bottom. When I switch the language from German to English or from English to German I see part of my featured articles but they do not start with the first article but somewhere about 2/3 down the list of featured articles which makes no sense to me.

If I use the (2) button at the bottom of the page to view additional articles and then switch back to (1) to see the previous articles I now see the correct start page I want. For some reason when switching the language one parameter is missing: limitstart=0 Because this is the only difference in the URL after I do the (1) -> (2) -> (1) switch.

How can I fix my website so I can correctly switch language also on the start/homepage URL?

I am using the most recent Joomla 3.8.12 and I have been upgrading regularly over the years. I do not know when exactly this error occured but it definitely used to work correctly some time ago.

Thank you
Last edited by toivo on Sun Sep 02, 2018 8:40 am, edited 1 time in total.
Reason: mod note: moved to 3.x Language

KianWilliam
Joomla! Explorer
Joomla! Explorer
Posts: 345
Joined: Thu Jan 12, 2017 10:13 am

Re: Problem with Joomla language switch only on start/homepage link

Post by KianWilliam » Sat Sep 01, 2018 9:34 am

If I am not much mistaken, I had this problem before and I developed a plugin for that, It MIGHT work to resolve your problem, I can send you its download address.
Kian William

insightout
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Dec 12, 2010 8:57 am

Re: Problem with Joomla language switch only on start/homepage link

Post by insightout » Sat Sep 01, 2018 11:10 am

A plugin to fix it? But isnt this something that should be a working core functionality of Joomla? I'm willing to try out your plugin if you send it.

Thanks in advance

insightout
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Dec 12, 2010 8:57 am

Re: Problem with Joomla language switch only on start/homepage link

Post by insightout » Sat Sep 01, 2018 11:25 am

Btw I have one idea that might be partly related. Back with Joomla 2.5 or even earlier 3.x versions the featured articles sort order number could be manually edited. Currently I only see ways to move things by draging them but back then there were numbers. I recall I gave 2 articles negative numbers so that they would always remain on top even when adding new articles which would end up on position 1. This always worked fine but maybe now that the numbering is gone, might these negative numbers cause an error? But even if they do it should only affect the 2 articles with negative ids pretty much all of them have a positive id and why would an article that maybe is somewhere around id 30 be the first one when switching the language. I'm not sure about these ids since in the current version you cant see them anymore...

KianWilliam
Joomla! Explorer
Joomla! Explorer
Posts: 345
Joined: Thu Jan 12, 2017 10:13 am

Re: Problem with Joomla language switch only on start/homepage link

Post by KianWilliam » Sun Sep 02, 2018 7:51 am

My problem was this: you select the language, for example the french language, then user logs in, instead of going to French welcome page, the user directed to English welcome page, I developed a plugin for that, the initial idea was from a Russian friend, I only turned it into a plugin.
Its name is Multilanglog, if you type it in jed extension search, it will come up.
Kian William

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18685
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Problem with Joomla language switch only on start/homepage link

Post by infograf768 » Tue Sep 04, 2018 5:12 am

Concerning login and redirect to another language than the one you are in, it may just mean that you have enabled "Automatic Language Change" in the languagefilter system plugin AND that the preferred site language for the user is set to the other language.

The problem described by @insightout is totally unrelated.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18685
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Problem with Joomla language switch only on start/homepage link

Post by infograf768 » Tue Sep 04, 2018 7:15 am

"I recall I gave 2 articles negative numbers so that they would always remain on top even when adding new articles which would end up on position 1. This always worked fine but maybe now that the numbering is gone, might these negative numbers cause an error?"

I would first get rid of these negative numbers.

The correct way to do it is to put your site offline.
Then make a copy of the articles with such negative ordering. Delete the originals. Rename the copies in order to have the same aliases as the originals.

Then, in the Featured articles manager, order the articles as you wish.

For each featured article menu item, make sure you choose "Feature Articles Order" for the Article order.

Clean all caches (joomla, template and browser)
Put site online and test.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

insightout
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Dec 12, 2010 8:57 am

Re: Problem with Joomla language switch only on start/homepage link

Post by insightout » Thu Sep 20, 2018 11:52 am

@infograf768

Sorry for the late response but I was not notified that there was another posting and just checked again this morning.

I created a copy of my website and did what you recommended: I copied the 2 articles from which I knew that had negative numbers, I deleted the old ones and renamed the aliases.

I made sure that "Feature Articles Order" was selected in the menu but still I an getting the same result. I set up a second home menu item just to compare different settings and this is what I found:

When I switch the language the sort order I get is "Article order" and not the selected "Feature Article Order". So my best guess is that this might be a bug but it only is active when switching the language because when I select section (2) of all featured articles and then go back to section (1) I now see the correct "Featured Artice Order". When comparing the called URL, there are only minor differences:

URL: directly after language switch
index.php?option=com_content&amp;view=featured&amp;Itemid=515&amp;lang=en

URL: After switching to section (2)
index.php?option=com_content&view=featured&lang=en&limitstart=13&Itemid=515

URL after switching back to section (1)
index.php?option=com_content&view=featured&lang=en&limitstart=0&Itemid=515


I dont know what else I could do at this point. Hopefully you say its a bug and it can be fixed in a new Joomla release...

Addon: I forgot to mention that after the initial language switch it is not just the sort order that is wrong but also the other Layout settings of like the # Columns 1 is ignored and the articles are displayed in 2 colums. Basically the ItemId=515 seems to be ignored because when I remove that part completely from the called url I get the same result
Last edited by insightout on Thu Sep 20, 2018 12:18 pm, edited 1 time in total.


Post Reply

Return to “Language - Joomla! 3.x”