Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Opening a specific node for editing from admin/content list, incorrectly imposes currently negotiated language.
If your current path is /en/admin/content and you try to open node/123 which is in German, the English member of translation set will open anyway and you need to click into translation tab and then into desired language.
That's too much click-consuming.
Comment | File | Size | Author |
---|---|---|---|
#7 | i18n_adminfix.zip | 1.02 KB | crispynewt |
Comments
Comment #1
thelmer CreditAttribution: thelmer commentedThis one would be nice to have solved.
Content editors don't understand why it's important to have their current language set to the same as the translation they are editing.
Some of the things that will go wrong are node references and menu items (1)
1) http://eureka.ykyuen.info/2013/02/28/drupal-7-menu-item-is-disabled-afte...
Comment #2
ZikPhil CreditAttribution: ZikPhil commentedHi,
I am still getting this error at the moment. Can we get an update on the status?
Comment #3
crispynewt CreditAttribution: crispynewt commentedHi,
I'm also having this issue and it's causing major problems when the node has term reference or entity reference fields as the values displayed are in the wrong language.
Can you let us know if there's a workaround?
Comment #4
ZikPhil CreditAttribution: ZikPhil commentedThat is a workaround, to be added into the theme 'Seven' or whatever admin theme you are running with. It changes every edit link and replace the url lang with the right one. Still it would be nice to have a core-fix :)
Comment #5
alberto56 CreditAttribution: alberto56 commentedI can't reproduce this problem on my site. Can someone who is experiencing this please post a screenshot of what they see on admin/config/regional/language/configure?
Comment #6
GeDu CreditAttribution: GeDu commentedThanks, ZikPhil for the solution. It's a very dirty solution but works. alberto56 see image here: img . I tried changing these settings on this page but nothing helped.
Comment #7
crispynewt CreditAttribution: crispynewt commentedFirstly, thanks for the workaround ZikPhil and apologies for not acknowledging your help sooner... much appreciated!
I managed to adapt this into a quick and dirty temporary solution but now that my client is adding a number of additional languages this isn't a feasible solution any more.
I've now taken a different approach and have implemented a custom module which uses hook_form_alter to loop through all nodes in the admin content listing and rewrites the edit operation if the language of the node is different from the current language.
This should work whether the site is configured to determine the language using the path prefix or domain.
In place of a core fix, I hope this saves someone else some time with this issue.
Comment #8
kumkum29 CreditAttribution: kumkum29 commentedHello,
i have the same problem in my site (en/fr).
In the admin content page, i uses view to display the table of the nodes. So, the previous methods seems not to be functionals.
I have created a custom field template for this admin view and insert this code:
It's ok, but for me it's a dirty solution, because in the page of translation, i get the same problem.
In several posts we have this problem. But no good solution is proposed. (https://www.drupal.org/node/1905268...)
Comment #9
pinoniq CreditAttribution: pinoniq commentedI fixed this issue with a small hook:
This shoud however be done in i18n
Comment #10
pinoniq CreditAttribution: pinoniq commentedComment #11
Jose Reyero CreditAttribution: Jose Reyero commentedResetting priority.
Comment #12
dparvanov CreditAttribution: dparvanov commentedHi everyone.
Firstly thanks to pinoniq for the working solution.
I have however same problem with links in translation overview page.
When content is in untraslated status links are working and translation nodes are created.
But when translation is in status complete link only open edit form for the current language.
Can you help me made a solution for this as well...
Update...issue was due to Translation overview module overriding the links. Deactivating the module seems to fix the problem.
Comment #13
pwiniacki CreditAttribution: pwiniacki commentedI can confirm this issue - very frustrating. Definitely MAJOR one, cause you have a lot of work after editing node in a wrong language cause of taxonomy dependents (witch are working wrong...).
Comment #14
matthieu_collet CreditAttribution: matthieu_collet commentedyes major issue for me too,
it's impossible to do correct translations without changing the language of the page itself, we completely loose node reference synchronisation :(
and js hack doesn't work in the pages I need
module at #9 works in the all content page, thank you ! I try now to adaot it also at another important page, all the "node/NID/translate" pages
Comment #15
matthieu_collet CreditAttribution: matthieu_collet commentedin fact, we can correct the function i18n_node_translation_link
bug is there I think, I added
Do you think my proposition is right ?
As it to be proposed as a patch ?
Comment #16
rghazaliii CreditAttribution: rghazaliii commentedThank you crispynewt for your great module. it really saved me. thanks a lot again.