Closed (fixed)
Project:
Language Switcher Dropdown
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2011 at 13:20 UTC
Updated:
24 Feb 2012 at 01:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
s@ilor commentedYep! Me too.
Subscribing.
Comment #2
it-cruSubscribing.
Comment #3
johnhanley commentedDitto.
Comment #4
it-cruError message is only displayed if a translation of the node doesn't exists. When the node is translated in all active languages the error message isn't displayed any more.
Comment #5
marcred commented+Subs.
Comment #6
matulis commentedIf there is no translation, href is undefined. Set it's value to frontpage, so if node has no translation, user will be redirected to front page.
Comment #7
johnhanley commentedComment #8
it-cruThe patch from matulis in #6 removes the errors, but I think it isn't the right way to redirect to the front-page if the translation of this node doesn't exists. It would be better to display the node in its language source or side-wide default language.
Comment #9
matulis commentedIT-Cru,
if I have website with 2 languages, for example, English & Spanish, and there is node only in English, what would happen if user try to switch to Spanish? Nothing?
Comment #10
it-cruI think it would be good to switch to the source node, because this node exists.
Example (site with 3 languages [EN, DE, ES]):- node1 only in EN (source) -> switch in DE & ES to EN
- node2 in EN (source), DE -> switch in ES to EN
- node3 in DE (source), EN -> switch in ES to DE (because here DE is the translation source)
- node4 in EN (source), DE, ES -> switch to selected translation
Comment #11
alexpls commentedSubscribing.
Comment #12
daniel wentsch commentedSubscribing
Comment #13
demoshane commentedI get Notice: Undefined index: href in lang_dropdown_form() error aswell, and page has been translated to all languages
Comment #14
nagiek commentedAny word from maintainers? The module isn't really usable now with the error message.
Comment #15
shabanbi commentedi added above patch in my code but it is not working ,
please can you give me solution front end dropdown select languages .
Comment #16
zoszabo commentedsubscribe
Comment #17
torbjoernk commented@matulis: I've got one question regarding your patch. Wouldn't it be more appropriate the user is redirected to the translation page of the node? What do one have to put instead of '' to link to 'node/#/translate' ? However, if the user is not allowed to translate a node, he would be shown an error page automatically.
Comment #18
dukem commentedMade this patch - when a user selects a language for which a translation does not exists it redirects to default or existing translation but with the selected language turned on.
For example from existing English translation of a node #9 it will redirect to /ru/node/9. The site is in Russian but node content is in English.
Comment #19
rtdean93 commentedPatch in #18 worked.... however - it should have been generated from the module directory instead of your home directory....
$ patch -p1 < lang_dropdown.module_0.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /home/dukem/work/icrypt/drupal/lang_dropdown.module 2011-10-06 15:53:18.000000000 +0300
|+++ /home/sites/icrypt/htdocs/sites/all/modules/lang_dropdown/lang_dropdown.module 2012-01-25 19:32
:42.000000000 +0200
Comment #20
grozozo commentedI manually applied the patch of #18 on my bilingual drupal and it work like a charm.
thx dukem!
Comment #21
dukem commentedMy bad. Recreated patch with git.
Also added
return '<front>';if no translation was found (should not happen normally).Comment #22
Sylvebois commentedHello all,
I tried the patches but I wanted to add one thing : a warning message for the visitor. So, he will know what happen.
For that purpose, I reused the patch in #6, modified it and added some code. It's less elaborate than patch in #21 but it seems to work ...
I just hope I have created the patch the right way ...
Comment #23
dukem commentedI think that the patch at #22 is simpler and better.
Maybe make error message display configurable (show or not)?
Comment #24
webmaster-eddie commentedI have the same problem.
I applied the patch successfully. Thank you. Will I have to re-apply the patch every time the module is updated through drush up?
Is there some kind of super simple command line command that automatically applies the changes in the patch to the correct file? If so, would someone please tell me how to do this?
Thanks,
Eddie
Comment #25
manfer commentedWouldn't it be just better to don't show in the switcher any language for which there is no translation available in current node?
Comment #26
manfer commented