Active
Project:
Drupal core
Version:
main
Component:
language system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Sep 2015 at 12:36 UTC
Updated:
12 May 2025 at 06:38 UTC
Jump to comment: Most recent
Comments
Comment #2
sutharsan commentedComment #3
sutharsan commentedComment #4
gábor hojtsyWe cannot really set it to neutral if it had translations or if the English one was a translation. Neutrals are not supposed to have or appear as translations.
Comment #5
gábor hojtsyComment #6
plachThese kind of issues have always been tricky, honestly I'm not even sure there's a proper fix.
I'd be tempted to close this as the current behavior is by design in a sense.
(Closed #2595137: Switching site language makes previously created nodes unusable as a duplicate)
Comment #7
gábor hojtsyRight, we can try being draconian and not let you delete languages that have something stored with them, but that would require a new API. Its not like anything else does that. Eg. a node with an entity reference to another does not stop you delete either.
Comment #8
attiks commentedMaybe we can just change the message saying that the content is still preserved but no longer accessible and that the content can be restored by re-enabling the language?
If we want to get fancy, we may provide an option to copy the English data to another language?
Comment #9
plachI guess this could be a good compromise, since the following
is the kind of feature that brings very little benefit compared to the effort required to implement it (and maintain it!)
Comment #13
HSteeb commentedAbout step 5 "Remove the English language":
As a user, I would expect: if I delete a language, ...
Comment #14
weseze commentedI just discovered a related issue to this that in my opinion breaks my site entirely...
The underlying problem is the same, but the steps are slightly different and the expected result looks like the entire site is broken. While I was expecting everything to work fine...
Steps te reproduce:
1/ Install Drupal in any language
2/ Enable language and content translation modules
3/ Configure a content type and make it translatable
4/ Create content and translate it
5/ Switch the default language and delete the original language Drupal was installed with
At this point I would expect the content to be shown in the remaining language, since I created a valid translation for it.
But the content is shown in the deleted language and I can not recover my translation.
Comment #18
Jorgee commentedI had same problem as OP, but the worst part is that node is unrecoverable because no matter how many edits you do, content will not show up.
I had to remove nodes and custom blocks created in 'en' and recreate them.
And this happened only because I needed a language for the strings only.
I don't understand why Drupal does not separate language and content language.
Comment #21
heiligerbiber commentedThis gave me a headache as I (as a fairly new drupal user) did the same as the OP. My page is is German-only but was installed with English as default language. At some points this was visible to the user (e.g. it says "None" in a form as default when nothing is selected) so I wanted to change the system language to German. To my big surprise, after activating German and removing English all content was gone. Well after finding this issue I could recover by re-installing English but still this seems like a major bug to me. Ideas:
- There should be at least a big warning.
- I didn't see that there is a language assigned to every node (at least in my monolingual setup there is no option to change the content language of a node). It would be great to have the option "Change language of all existing nodes to this language"
- When trying to edit a node where it seemed all content was gone it would be great to have some hint instead "No content in your default language available. But this node contains content in language 'en' which you don't have installed. Find some instructions on what to do now somewhere..."
Comment #22
avpadernoComment #23
mastap commentedIs there a viable solution to removing the default language?
We are in a situation when the site was made in English as main language, and Chinese as second language.
Now we need to remove the English from there.
We switched to Chines as default and removed English language
But we encounter many issues.
The node content disappear in Chinese. Especially in Paragraph
What is THE procedure to remove an original default language?
Thanks!
Comment #24
weseze commented@MastaP: Not an official procedure, but we are using https://www.drupal.org/project/disable_language to just disable "English" in these cases.
Comment #25
mastap commentedThanks. But we're not looking for a front end solution. We want to completely get rid of English on this site and put another language as "Original Language".
Seems this MIGHT in the right direction
https://www.theodorosploumis.com/en/blog/change-default-language-drupal-...
But in the end really, We wish there was a cleaner way to handle this situation where we want to REMOVE initial language
Comment #26
avpadernoDrupal 8.9.x is now open only to security issues.
Comment #27
mastap commentedRight - This is cumbersome as 9 is not so widespread yet.
In any case this is ALSO a 8.x problem. Would be good to apply to multiple.
Is there a solution to this issue!?
Thanks
Comment #32
luke.stewart commentedGiven the elapsed time. Just reconfirming that this seems stlll to be an issue. I have done the following (on 10.2.4)
Enabled: Content Translation, Language, Interface Translation. Configure related permissions.
Added the first language that showed up in select here: admin/config/regional/language
Enabled Content -> Content types Basic Page and Article to be translatable here: admin/config/regional/content-language
Added a new node of type Basic Page English with something in the body.
Added a translation for language 2
Set Language two to default here: /af/admin/config/regional/language
Deleted Language En here: /af/admin/config/regional/language
Refresh the node.
For the default language get the english version not language 2 as might be expected?
For the previous language 2 page get content not found.
I want to do more digging to replicate the steps in the original post. However It seems like comments 6 and 8 would perhaps agree that a good solution here is to better inform the user of what is actually occurring rather than add additional behaviour.
Comment #33
dianaprecup commentedI had the same issue on Drupal 10.3.10. I had the default language of a website in Danish, I installed the Norwegian one, selected as default language. When I deleted the Danish one, even if I had a confirmation popup which said that all the Danish content will be updated to the default language, this doesn't happens. The lang code become empty.
My solution to fix this issue was to run the following code in a hook_update_N: