Problem/Motivation
I'm using a drupal 10.1.1 site that migrated from drupal 7, then 9
Submitting the "Content language and translation" form (ContentLanguageSettingsForm) does not save the "Custom language settings" checkboxes.
Steps to reproduce
In "Custom language settings" section, I have 3 values already checked: Content, Redirect, Url Alias.
If I uncheck them, they remain checked after the submit.
If I check a value that's not selected, it won't be saved after submission.
I wanted to activate translations for the menu. Checking the "Custom menu link" value doesn't change anything.
Proposed resolution
This is not a solution, but to correct my problem I modified the ContentLanguageSettingsForm. I had to set the value "language_alterable" to true for "menu_link_content" settings
Comment | File | Size | Author |
---|---|---|---|
#21 | Screenshot from 2024-04-10 11-53-50.png | 237.46 KB | trickfun |
#16 | 3378812_core_content_translation.patch | 597 bytes | Artyom Hovasapyan |
#14 | Screenshot from 2024-03-11 11-15-44.png | 105.04 KB | Artyom Hovasapyan |
#8 | translation.png | 182.26 KB | trickfun |
Comments
Comment #2
bmahesh03121 CreditAttribution: bmahesh03121 at QED42 for Drupal India Association commentedWorks as expected, after selecting an entity type you edit or add default translation and one field. otherwise, it will behave as default settings and will save the configuration.
Comment #3
olorin.fr CreditAttribution: olorin.fr commentedWhere did you read that I was talking about entities types?
I never said anything about content types and fields (they work and the "Content" checkbox was already enabled in my case). I'm talking about the part above "Custom language settings". For example to activate translations on others components (menu, ...).
Comment #4
bmahesh03121 CreditAttribution: bmahesh03121 at QED42 for Drupal India Association commentedapologies, let me clarify, after selecting or deselecting the elements at the top in 'Custom language settings', it will show or hide the details field translations settings. if you want to disable translations you can deselect the fields translations in below details section for particular element and can also set the default value for 'Default language' as the site's default language. after saving that it will not show the element as selected at the top 'Custom language settings'. i understand your issue now. that by changing the settings at the top, it should disable the whole translation. but I think the best way should be to review the fields and enable/disable the translations as required. instead of disabling the translations absolutely with non-recoverable translation loss issues. keeping this in review. please share your thoughts.
Comment #5
smustgrave CreditAttribution: smustgrave at Mobomo commented@olorin.fr does #4 answer your question?
Comment #6
dwwPedantic nerd warning: “data” is already plural. 😂
Comment #7
avasquez15 CreditAttribution: avasquez15 as a volunteer commentedI got the same issue, but it was solve after checking the "Show language selector on create and edit pages" box, or selecting a default language, if you don't do any of those it will not save the config. I hope this help
Comment #8
trickfun CreditAttribution: trickfun commentedI got same issue with drupal 10.2
When i open "Content language and translation" page my taxonomy term "Collection type" is checked but i can't see the list of fields.
So i uncheck and check again the "collection type" checkbox but previous selections are lost.
"FAQ tags" checkbox isn't selected but i can see the fields.
Something wrong here.
Thank you
Comment #9
trickfun CreditAttribution: trickfun commentedII get this error. Drupal 10.2.2
Comment #10
trickfun CreditAttribution: trickfun commentedAny news here? it's impossible translate content.
Thank you
Comment #11
tobas1996 CreditAttribution: tobas1996 at Hiberus commentedHi!
I'm facing the same issue here with drupal 10.2.2.
When i open "Content language and translation" /admin/config/regional/content-language , when I select some of the "Entity type" checkboxes, it shows the entities down. BUT, when I save its not saving, and also I cannot see the fields
So i uncheck and check again the "collection type" checkbox but previous selections are lost.
Thank you.
Comment #12
trickfun CreditAttribution: trickfun commentedI have this error with this checkbox
something with file field.
I hope help
Thank you
Comment #14
Artyom Hovasapyan CreditAttribution: Artyom Hovasapyan commentedI found solution :). We must add !.
Comment #15
Artyom Hovasapyan CreditAttribution: Artyom Hovasapyan commentedComment #16
Artyom Hovasapyan CreditAttribution: Artyom Hovasapyan commentedComment #17
useernamee CreditAttribution: useernamee at drunomics commentedUnfortunately the patch does not work for me. If I try to edit the fields of specific content/bundle, after saving the form all the fields are hidden and if I check and uncheck the bundle all the fields checked once again.
I'm not even sure where the field data should be even saved after submitting the form.Anyways I think that the data is correct even though once the form reloads you can't see which fields are (un)checked. I did de-select some paragraphs fields, saved the form and then checked the values that were visually hidden and the fields were (un)checked correctly as I set them.
I guess it is inconvenient not to be able to see the field settings but the configuration is saved correctly.
Comment #18
trickfun CreditAttribution: trickfun commentedI can't apply the patch on drupal 10.2.4.
thank you
Comment #19
le72The issue is resolved in 10.2.3.
https://www.drupal.org/project/drupal/issues/3414415
Comment #20
Artyom Hovasapyan CreditAttribution: Artyom Hovasapyan commentedOn drupal 10.2.4 has already fixed.
https://www.drupal.org/project/drupal/issues/3414415.
Comment #21
trickfun CreditAttribution: trickfun commentedI have 10.2.4 but is not fixed.
Checkbox doesn't show fields.
Comment #22
handkerchiefI have 10.2.4 and the same problem:
it is impossible to translate the website, the settings are not saved.
No error in the logs, what the hell is going on?
Comment #23
handkerchiefThis commit fixed the problem (after cache clear)
https://git.drupalcode.org/project/drupal/-/commit/61bc6f8e8cda4f708038c...
Comment #24
smustgrave CreditAttribution: smustgrave at Mobomo commentedCan you check 11.x
Comment #25
Joe HuggansNot sure if I am seeing the same issue but the patch did not work.
I am unable to make changes to the form at /admin/config/regional/content-language
For example, if I turn off translation for redirect, save the form, the page reloads and the translation for redirect is still turned on.
Drupal core 10.2.4