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.
If you have an unpublished translation there will be created a language icon linking to this content on the original node, though the user has not the necessary rights to see this node.
So, please, honor the user permission in the language icons created at the bottom of the nodes and don't lead the user to "Permission denied".
btw. With the sync module it is possible to have different states with the original node and the translation node!
Comment | File | Size | Author |
---|---|---|---|
#34 | translation-status-hide.patch | 2.05 KB | Gábor Hojtsy |
#29 | translation-366768-29.D6.patch | 1.99 KB | plach |
#25 | translation-366768-25.patch | 1.42 KB | plach |
#23 | translation-366768-23.patch | 1.41 KB | plach |
#20 | translation-366768-20.patch | 1.43 KB | plach |
Comments
Comment #1
Freso CreditAttribution: Freso commentedThe "Language Icons" module only adds icons to the language links; the language links themselves are created (and managed) by core's locale.module.
Comment #2
Pepe Roni CreditAttribution: Pepe Roni commentedThank you.
But I do not care any longer for which language dependent module is responsible for any error I find with translations, whether it is core.locale or i18n or core.sync or core.taxonomy ore core.menu or what else. Working with translations in D6 for more than 6 month I have lost the overview over the responsible modules. Translations with D6 are a hassle. If D6 (except translations) was not that easy to use and extend, I would have already switched to another CMS, even if it might have a typo in it's name ;)
Comment #3
Freso CreditAttribution: Freso commentedHm. Btw, is this link in the "Language switcher" block, or in the language list on the nodes themselves? If the latter, this is actually a translation.module issue. Just to confuse matters even more. :p Also, would it be possible for you to test this in a 7.x install, to see if the problem also/still resides there?
Comment #4
Pepe Roni CreditAttribution: Pepe Roni commentedI talk about the language list on the nodes themselves, that link to the translation of the node (to another node id). The language switcher block is only used to switch the presentation language and does not change the node id if you are in the node display, thus you won't run into the described problem.
And currently I am not willing to test a 7.x install. I have to do much too much to keep a multilingual D6 site running and to teach translators how to translate this site. Did you know that you have to grant content administration rights to translators if you want them to have a fully functional workflow of translation process? But this is not part of this issue, so, please, forget it as soon as possible.
Comment #5
Freso CreditAttribution: Freso commentedAlright. Switching component then. ;) And I'll try and take a look at it at some point, unless someone else beats me to it.
Comment #6
Jody LynnBugs get fixed in HEAD and then backported.
Comment #7
hass CreditAttribution: hass commented+
Comment #8
hass CreditAttribution: hass commentedMarked #377606: i18n linking to unpublished pages as a duplicate.
Comment #9
hass CreditAttribution: hass commentedHere is a D6 patch.
Comment #10
hass CreditAttribution: hass commentedAnd here the D7 for the test bot.
NOTE: This patches are not fixing the language switcher block, only the node links. I'm not sure how to fix the locale module to show only active links or links the current user have access to.
Comment #12
fletchgqc CreditAttribution: fletchgqc commentedHaving the same problem (#764952: Content translation links show for unpublished nodes has been marked as a duplicate). Definitely needs fixing - I would be willing to test patches against D6. Do you want me to try the D6 patch above?
Comment #13
plachRerolled. This could use some tests, though.
Comment #14
plachI think we should clarify some aspects before going on with working on a fix. Please follow up on #778528: Define the language switcher's correct behavior.
Comment #15
fletchgqc CreditAttribution: fletchgqc commentedI checked out issue #778528 but it was above my head. Nevertheless I applied the D6 patch #9 manually (applying programatically didn't work for me) and it fixed the problem, it's currently working well on a production site.
Comment #16
GiorgosKuploading a D6 patch that works
different approach then #9 which did not seem to work
Comment #17
plach@GiorgosK:
We need to fix this in D7 before any patch can be committed to D6. Please review/test #13 if you wish to speed-up this issue.
Comment #18
GiorgosKHad to apply the patch manually because it was not applied
rerolled patch but no changes in it
Reviewed and tested
behaves as expected
Comment #20
plachRerolled.
Setting RTBC as per #18.
This still needs tests but they will have to wait for #780316: Missing node translation links when no language detection is configured to go in, as it introduces a test case for the content translation links (trying to write some tests without it would imply rewriting most of its code).
Comment #21
sunPatch looks good. And actually, if this issue also exists in D6, then it could almost be understood as security issue. So let's pretend it's security hardening only.
Comment #22
plach#20: translation-366768-20.patch queued for re-testing.
Comment #23
plachSince
translation_node_get_translations()
performs anode_access
query probably just checking the translation status should be more performant.Comment #25
plachSilly me
Comment #26
GiorgosK#25 works as expected
Comment #27
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #28
plachGreat, now we need to port this to 6.x. I'll post a patch ASAP.
Comment #29
plachHere it is.
Comment #30
GiorgosK#29 works as expected
Comment #31
plachTests for D7 will be provided in #778528: Define the language switcher's correct behavior.
Comment #32
Gábor HojtsyHm, why not use full fledged node_access()? There might be other reasons you do not have access to that node, right?
Comment #33
plachWell,
$translations
comes from a node_access (D7)/db_rewrite_sql (D6) query, so we are already applying node access logic or am I mistaken?Comment #34
Gábor HojtsyRight, and this was discussed above. Ha! Ok, added one line of comment to make this more clear and committed with this change. Thanks!
// Path can only start with "node/$nid" or "node/$nid/" here.