jDiction Forum

English => General Questions => Topic started by: stajp on March 28, 2015, 10:38:44 pm

Title: Language gets changed but jDiction doesn't change to new language
Post by: stajp on March 28, 2015, 10:38:44 pm
Hi Harald,

I have a strange issue with jDiction after migrating a website to a new server. The thing is that when I click to change the language, the content language remains the same as it was. When I inspect the page code, it shows that the language is the one that I selected. Then when I reload the page, the selected language gets loaded.

Even stranger thig is that this bug doesn't happen with Default Language, only with the Translations. If I change to the Default language, everything is as it should be.

Before that I updated from J3.3.6 to J3.4.1 and jDiction from 1.3.2 to 1.4.1.
But on my production server it works fine. When installed on the other server, the issue arises.

Do you have any idea why the translations don't get loaded on first page load?

Thank you and best regards
Marko


Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on March 28, 2015, 11:44:57 pm
Hmm there was a problem in 1.4.0 but i sorted this out with 1.4.1.

Do you use sef URLs?
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: stajp on March 30, 2015, 09:39:59 am
Yes, I use SEF URLs nad URL rewriting.

In "System - Language Filter Plugin" everything is set to Yes.

Strange thing is when I go to an article and want to change the language, the link for the other language looks perfectly ok, but then it just redirects to the homepage.

Can I send you an access details to look at the issue?
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on March 30, 2015, 12:54:43 pm
yes please
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on March 30, 2015, 01:40:08 pm
Seams to work now.
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: stajp on March 30, 2015, 02:27:08 pm
Hi, Harald. It almost works...
It works once the first translation shows, that is after the page gets refreshed for the first time after selected a new language.

But one must first click a language two times or refresh the page.

Any idea why this is happening?
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on March 30, 2015, 02:28:53 pm
?! I installed a ned version of the plugin that handles some translation parts, after this it worked for me...

do you still have problems?
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: stajp on March 30, 2015, 02:44:22 pm
The problem persists with the first click of the new language.
After first click it doesn't load the language selected.
On second click on the same language or the other language, everything starts to work normally.

hmmm...
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: IngusA on March 31, 2015, 09:53:47 am
Hi,
I also get this strange mistake after update to J3.4.1 and jDiction to 1.4.1
Any ideas?
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: IngusA on March 31, 2015, 11:49:42 am
I'ts a not a jDiction problem, i'ts J3.4.1 languagefilter plugin!

Very easy! You can copy an older version (from J3.3.6) of languagefilter.php file from the language_switcher plugin and overwrite the excising one. (yoursite/plugins/system/languagefilter/languagefilter.php)
The older version of languagefilter.php attached.

Regards,
Ingus
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: stajp on March 31, 2015, 08:37:12 pm
Ingus,
it worked!
Thanks a million.
Now I just need to remember to check (and if necessary overwrite the file) with the next Joomla update.

BR
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on March 31, 2015, 08:51:12 pm
Not the best plan, because I have to fix this and can't reproduce it here.
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: IngusA on April 01, 2015, 09:24:02 am
Hi Harald,
Ofcourse not the best plan but at this moment it helps to change language on my site with one click on the language flag.
I did not understand, are you have this fix or this fix come later?

Best regards,
Ingus
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on April 01, 2015, 12:18:23 pm
At the moment I have no installation with this problem but maybe tomorrow, so I can search for the problem.
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: IngusA on April 01, 2015, 12:35:24 pm
Thank you Harald!!!!  :)
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: stajp on April 01, 2015, 02:35:45 pm
Ingus,
in my case, the suggested "update" to a plugin from Joomla 3.3.6 installation didn't work.
As I use external link in the main menu to change between languages, the language didn't change until I clicked the language link of jDiction module for the language change (which I have at the bottom of the page). It looks to me like the plugin was not initialised...

Harald,
I changed the file back to Joomla 3.4.1, so the issue is back (need to refresh after first click).
You can access it again.

Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: IngusA on April 01, 2015, 03:05:34 pm
Ofcourse, this is not the " update", this is only temporary solution  :)
We have to wait for the latest fixies...
However I also have one external language switch on my site and it works at this time  ;)

BR
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Harald Leithner on April 07, 2015, 09:21:49 pm
I think I fixed the Problem with Joomla 3.4.1, DO NOT INSTALL ON JOOMLA 3.3.x.

The checkpage is important.

The Joomla Languagefilter Plugin must be loaded before the jDiction Plugin get loaded.

Please test the new version and report back, thx.
Title: Re: Language gets changed but jDiction doesn't change to new language
Post by: Fedor on August 01, 2017, 06:05:39 am
Hi, a bit late but for me this last hint fixed the problem with switching languages:

Quote
The Joomla Languagefilter Plugin must be loaded before the jDiction Plugin get loaded.

Fixed the loading order, set the Language Filter to be the first thing loaded and now my site switches languages like a charm! Thanks!

No further fixes needed.