Shop switching to inactive language

Hello,

our e/shop (OXID CE 4.4.8) keeps switching into inactive language (DE) “randomly”.

There is only one active language set in admin - Slovak (ID 3) and 2 inactive languages (DE, EN).

It has happened several times to our administrator and at least one of our customers as well. I told them to clear browser (Firefox) cache and try again, it looks like it solves the problem temporarily. But it happend again later.

Is it possible it’s related to shop upgrading/updating process or to some maintenance tasks (deleting tmp…) ? Any ideas how to solve this problem?

PS: Is it safe to delete inactive languages (DE, EN) completely?

Thanks :slight_smile:

no problem to delete inactive languages as long as the active langauge still exists

Sometimes the browser asks for “his” default language, so maybe therefore the shop delivers the wrong language.

Thanks for the answer.

Unfortunately, it looks like it’s not possible to delete DE language at all (ID 0), see attached screenshot

:confused:

If “Deutsch” is deactivated there is no need to delete it.

If you really want to delete it, you need to change the “ID 0” which is not that easy.

Yeah, you are right, I wouldn’t need to delete it, but our e-shop keeps switching to “Deutsch” even if it’s inactive. It’s never been active in fact.

The problem is I just can’t figure out when or why is this happening.

did you set “Slovak” as default?

[QUOTE=Hebsacker;54292]did you set “Slovak” as default?[/QUOTE]

Yes, it’s set as default, it’s been default language for almost 2 years now :slight_smile:

It’s the only active (and default) language in the shop.

One more thing, even Google indexed a bunch of “/de/…” pages from our e-shop, I have no idea why, I never enabled DE language, I had to disable /de/ in robots.txt

I’ve just made dirty fix in .htaccess file:


# DE language fix
redirectMatch 301 ^/shop/de/ /shop/

:eek: :stuck_out_tongue:

Oh well, my previous “fix” doesn’t really work…

I was doing a test while ago:

  1. I’ve logged into frontend (like a customer)

  2. I deleted /tmp directory on webserver

  3. Voila! Frontend switched to Deutsch version and I wasn’t able to switch back to Slovak version.

  4. I’ve tried to log into backend (admin) and it was in Deutsch as well.

  5. It looks like the only way to make OXID switch back to default frontend language is to complete clear cache in Firefox, but it’s impossible to ask every customer to clear browser cache after every OXID update/upgrade process :frowning:

Maybe I should fill a bug into Mantis or something…

Maybe Marco or someone else can tell exactly how to change the language ID and after that delete the Deutsch completely.

I’ve got call from another customer this morning, it looks like it’s switching to Deutsch after clicking on some links in frontend (e.g. ?cl=account, ?cl=basket etc…).

Now I’m trying another quick dirty hack:

In the file core/oxconfig.php I changed

        // some important defaults
        if( !$this->getConfigParam( 'sDefaultLang' ) )
            $this->setConfigParam( 'sDefaultLang', 0 );

to

        // some important defaults
        if( !$this->getConfigParam( 'sDefaultLang' ) )
            $this->setConfigParam( 'sDefaultLang', 3 );

I think I’m gonna wait for version 4.5 and then I’ll investigate this problem properly :wink:

Hi,

I am afraid it has nothing to do with the version. Thus, 4.5.0 won’t bring you the salvation.
Have you checked with oxchkversion already, have you cleared your /tmp/ folder?
Usually, the shop shall jump to your active language if your browser supports it. Otherwise, it jumps to Globish like I said in my personal blog post.

Regards

Hello,

thanks for the answer, I’ve checked your blog post.

There is one and only active language in our e-shops: Slovak (ID = 3). This is also the default language. English language is deleted, Deutsch is deactivated (it’s not possible to delete ID 0 language for some reason).

Maybe I’m wrong but I think our frontend should be in Slovak language all the time regardless on browser settings (there’s only one active frontend language anyway).

I’ve tried to check oxchkversion, but there’s an error “404 not found” for:

http://support.oxid-esales.com/oxchkversion/webService.php

I’ve tried to clean /tmp folder many times, it doesn’t help.

One more important thing - I’m using localized (CZ/SK) version downloaded from the: http://www.oxid-eshop.cz/ so maybe I should ask on their forums instead :slight_smile:

Anyway, is that Czech company (oXy Online s.r.o.) related to OXID eSales AG in some way? Or are they “on their own”?

Thanks.

Hi,

[QUOTE=dominiks;54451]There is one and only active language in our e-shops: Slovak (ID = 3). This is also the default language. English language is deleted, Deutsch is deactivated (it’s not possible to delete ID 0 language for some reason).[/QUOTE]

Good. This is like it should be.

[QUOTE=dominiks;54451]Maybe I’m wrong but I think our frontend should be in Slovak language all the time regardless on browser settings (there’s only one active frontend language anyway).[/QUOTE]

Sure. It is usually if you have the settings like described above. Probably the problem is somewhere else, that’s why I asked for oxchkversion.

[QUOTE=dominiks;54451]I’ve tried to check oxchkversion, but there’s an error “404 not found” for:[/QUOTE]

http://support.oxid-esales.com/oxchkversion/webService.php[/QUOTE]

You are using an ancient version. The webservice moved a long time ago. You’ll find the latest one here:
http://www.oxid-esales.com/en/exchange/extensions/oxchkversion

[QUOTE=dominiks;54451]One more important thing - I’m using localized (CZ/SK) version downloaded from the: http://www.oxid-eshop.cz/ so maybe I should ask on their forums instead :)[/QUOTE]

I am not pretty sure if they make their own version. Actually, it should be much more simple to use the lang-files, the translated demo data as sql and maybe some slight other localizations as a localization module.

[QUOTE=dominiks;54451]Anyway, is that Czech company (oXy Online s.r.o.) related to OXID eSales AG in some way? Or are they “on their own”? [/QUOTE]

They are independent, if you mean that :wink: And yes, they are one of our partner agencies.

Regards

Hello,

[QUOTE=Marco Steinhaeuser;54472]
You are using an ancient version. The webservice moved a long time ago. You’ll find the latest one here:
http://www.oxid-esales.com/en/exchange/extensions/oxchkversion
[/QUOTE]

thanks… Script discovered 300+ various errors :eek:

[QUOTE=Marco Steinhaeuser;54472]
I am not pretty sure if they make their own version. Actually, it should be much more simple to use the lang-files, the translated demo data as sql and maybe some slight other localizations as a localization module.
[/QUOTE]

You are right. I’m going to “reinstall” our OXID using this method. I’ll try to run oxchkversion script later on new installation and I’ll let you know.

[QUOTE=Marco Steinhaeuser;54472]
They are independent, if you mean that :wink: And yes, they are one of our partner agencies.
[/QUOTE]

Thanks for the explanation.

Hello again,

  1. I made backup of all files on webserver

  2. I deleted every file on server

  3. I downloaded OXID_ESHOP_CE_4.4.8_34028.zip (from http://www.oxid-esales.com/), unpacked and uploaded (via FTP) to webserver

  4. I downloaded tc-fckeditor (version 1.3) and uploaded to server

  5. I deleted /setup directory

  6. I modified config.inc.php (just restored old values for database connection, etc…)

  7. I uploaded /out/admin/sk, /out/basic/sk and /out/pictures from local backup to server

  8. At this moment e-shop is supposed to be working fine again, frontend is in Slovak language, so let’s do some tests…

  9. I’ve logged into frontend and clicked ?cl=account link and frontend switched into Deutsch (inactive) language again :frowning:

  10. deleting /tmp doesn’t help

btw: oxchkversion is still reporting 373 modified files (in core, admin and views directories) :confused:

It looks like everything is working fine after “patching” core/oxconfig.php:

        
        // some important defaults
        if( !$this->getConfigParam( 'sDefaultLang' ) )
            $this->setConfigParam( 'sDefaultLang', 3 );

I think there shouldn’t be hardcoded 0 as default language ID, maybe OXID should read default language ID from the database instead… but maybe I’m wrong :wink:

maybe it would be a good idea to set default language in confic.inc.php

(or can change if necessary)

[QUOTE=dominiks;54506]
I think there shouldn’t be hardcoded 0 as default language ID, maybe OXID should read default language ID from the database instead… but maybe I’m wrong ;)[/QUOTE]
Looking at the code it seems like setting a language as default in admin should set the ‘sDefaultLang’ Param in the Database, and thus the hardcoded part that you changed should in fact never be reached once you have set a language as default. It would take some investigation to find out why this did not work in your shop.