Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Did you know that
Elxis 5.x
uses HTML5, CSS3 and pure javascript without external libraries such as jQuery?
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Language
(Moderator:
Farhad Sakhaei
) »
SOLVED Second language OFF and then ON
« previous
next »
Print
Pages: [
1
]
Author
Topic: SOLVED Second language OFF and then ON (Read 1401 times)
Luca
Full Member
Posts: 131
SOLVED Second language OFF and then ON
«
on:
August 15, 2025, 07:51:07 »
SOLVED: I got WHY, thank you anyway for your attention:
Meanwhile the secondary language was disabled, I made some text modifications in the default language of those modules and articles, thus saving the respective secondary language part of them as BLANK, in the db!!! Stupid me.
------------------------------------
Hello everybody, I hope to find you well!
I am facing a curious behaviour, here.
For a matter of a/b testing the seo reflectings, I decided to temporarily limit my website to the default language (EN), disabling the secondary one (IT).
When I reverted back, enabling my second language again, I've found that some (not all) of the translations have been lost (gone) from the database.
Now, I really don't know if it happened in the moment I switched off or back on.
This affected some articles as well as some text modules, and I didn't expect this to happen at all...
Any clue, please?
Thanks so much!
Elxis Version 5.5
Revision number 2585
Codename Hermes
Security level High
Elxis defender GF
PHP version 8.1.2-1ubuntu2.22
«
Last Edit: August 17, 2025, 07:58:46 by Luca
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10438
Re: SOLVED Second language OFF and then ON
«
Reply #1 on:
August 16, 2025, 21:59:00 »
Switching ON and OFF language does not affect translations saved in database. What can mess up things is changing the default language. This creates an inconsistency in translations table.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Luca
Full Member
Posts: 131
Re: SOLVED Second language OFF and then ON
«
Reply #2 on:
August 17, 2025, 08:28:29 »
Yes, indeed, also there's a warning about it, below the primary language setup
.
I can recall years ago when I "tested"
that. It really messed up everything and, moreover IS NOT easily recoverable
Back on
So, I've found out the reason because I've lost the translation. But
With the other languages switched off, shouldn't respective translations deserve to be protected in some way? On editing, you only actually have visible those active, ... If they are not in use this doesn't necessarily mean you don't want them any more...
OR, leaving visible on editing all the translations no matter if they are on or off, wouldn't prevent these kind of behavior?
«
Last Edit: August 17, 2025, 08:52:46 by Luca
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10438
Re: SOLVED Second language OFF and then ON
«
Reply #3 on:
August 17, 2025, 10:16:57 »
I will explain to you what may happened.
There is no delete button for translations.
A translation gets deleted when the value is empty.
When saving an article, or whatever, the translations system checks the strings that have been submitted for all languages.
If the value for a language is empty, or not provided, it is marked for deletion.
en: Hello
el: Γειά
de: Hallo
it: Ciao
If you set de = "" (empty) then the corresponding translation will be deleted from the database.
Example
You have an article title in 4 languages, de, en, it, es
You unpublish Italian language (it)
You go and edit the article. As Italian is unpublished only values for de, en and es get proceeded (there is no "it"). Therefor the saved in database value for it is empty and so gets deleted.
When you re-enable Italian language and go to edit the same article you will see that there is no value for the "it".
If you lost many translations due to the above reason it means that you have the language set to OFF for a long time and in the meanwhile you edit many items.
This is absolutely normal behavior and this is how the translations system works. The deletion of empty/unused strings is in order to remove items from the database not needed any more.
«
Last Edit: August 17, 2025, 10:18:58 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Luca
Full Member
Posts: 131
Re: SOLVED Second language OFF and then ON
«
Reply #4 on:
August 17, 2025, 12:01:03 »
Quote
So, I've found out the reason because I've lost the translation.
I don't want this to happen
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Language
(Moderator:
Farhad Sakhaei
) »
SOLVED Second language OFF and then ON