"Translate Text" button not working
azuledu - June 17, 2008 - 12:23
| Project: | Localization client |
| Version: | 6.x-1.5 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi community,
I've just instaled Localization Client module 5.x-1.0 in a 5.7 Drupal version.
When I push "Translate Text" button nothing happens.
Debuging it with Firebugs I get a "$.cookie is not a function" error in l10n_client.js (line 46)
Any idea about what's wrong?
Thanks

#1
Same problem with me, using 6.x-1.3.
I click in the "Translate Text" and no pop-up window....
#2
Tryed with Firefox and worked! seem to be a ie7 problem or configuration, can anybody help with this issue?
#3
I've tried with Firefox 3, with IE7, with Drupal 5.7 and with Drupal 6.2 ........ and it never works.
#4
> Debuging it with Firebugs I get a "$.cookie is not a function" error in l10n_client.js (line 46)
I get that error too, although it is line 89. It doesn't work in Opera either. I don't have IE7, only IE6 - the blue bar at the bottom of the website doesn't even appear on IE6, but I suppose that is to be expected.
I'm using 6.x-1.3 with Drupal 6.3.
Does this module use /misc/jquery.form.js? I replaced that file with a newer version due to a browser bug which the old version has with the core upload system. That's the only thing I've done to my installation that is unusual in any way.
Cheers.
#5
Finally I've found the problem.
As localization client module works perfectly installed locally, I suppose that there was a problem with my hosting provider. I talked with them and they found the problem. They use the ModSecurity application, and a firewall rule was blocking the module.
Maybe it works for you. Try it in local and, if it works, maybe the problem is on your hosting provider.
Good luck!
#6
I don't think my host uses mod_security.
You're supposed to be able to disable it from htaccess with this:
# switch off mod_security<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
But that doesn't work either on my server.
Glad you got it working though.
Cheers.
#7
wow, I finally fixed this problem on my drupal 5.10 install :x
way I did it was using this verison of the mod: http://svn3.cvsdude.com/devseed/sandbox/l10n_client_backport/
in conjunction with http://drupal.org/project/jquery_update (which requires u to copy a bunch of shit in the main drupal /misc/ dir)
then it still wouldn't load up the jquery.cookie.js
so I just copied it to the root dir and manually added it to my page.tpl.php
this causes it to always be loaded, even when ppl aren't logged in or anything, but I can live with this, especially since it's not even that big or anything
I'm so happy this works now, took me like a full day :x
#8
Please check version of module 6.x-1.3 or 5.x-1.0 very big diff?
Check your software.
#9
I thought I'd try this module again, but have the same problem with D6.5 and l10n_client-6.x-1.5
I see the 'translate text' bar at the bottom of the website, but it doesn't expand.
I'm using Firefox
1.033.3 (sorry, my mistake) on Windows 2000.Any ideas??
#10
use firebug and see if all the .js files are loading properly and/or if ur getting any errors in the console
also, try using an updated browser instead of some stone-age thingy ;)
#11
I'm not mean mod_security, I mean "ModSecurity application", an application independent of Apache that some ISP use.
#12
The only error I get is this:
Error: $.cookie is not a function
Source File: http://domain.net/sites/all/modules/l10n_client/l10n_client.js
Line: 89
which is: switch($.cookie('Drupal_l10n_client')) {
... although I do get a hundred or so javascript 'warnings' in the FF developer
plugin console, from scripts such as lightbox.js, drupal.js, jquery.js, extlink.js and
jquery.hotkeys.js (l10n client). Is that normal?
I do not know javascript, or anything about cookies.
How do I find out if all the javascript is loaded?
I don't have the slightest clue how to go about troubleshooting this error.
EDIT: Using Opera error console, I get a message:
Linked script not loaded -
http://domain.net/sites/all/modules/l10n_client/jquery.cookie.js
Firefox/firebug did not tell me this script was not loading.
So what do you think the problem is?
I've installed this module several times, so it's not a corrupt file.
Any ideas would be appreciated as trying to create a bi-lingual site using
the core's 'translate interface' is really difficult.
Cheers.
#13
firebug probably did tell u, just gotta look in the right place, e.g. the "NET" tab
I've noticed my host doesn't allow any files with .cookie in them, for security reasons, which imo is BS, but that to the side, this is how I fixed it
in my page.tpl.php, I replaced
<?phpprint $scripts;
?>
with
<?phpprint str_replace("jquery.cookie.js", "jquery_cookie.js", $scripts);
?>
and I renamed jquery.cookie.js to jquery_cookie.js in the l10n_client folder
ofc this isn't an ideal situation, and u'll have to redo the renaming every time u update the module, but it's worth a shot
#14
Why is that nobody reported this naming bug yet on http://plugins.jquery.com/project/issues/Cookie?categories=bug ?
#15
I didn't report it there, but I've been looking for other ppl that have a host that does weird stuff like that, and haven't found any1 else
and when I asked my host why they did it, they couldn't answer me, they said "it's just safer"
even after googling for hours for any exploitable things that include ".cookie", I couldn't come up with anything...
talked about it with the guru's at #jquery, and they told me not to report it, since it's not a bug in the jquery plugin, but more a bug in webhost policy
posted it in the issue list here a while ago: http://drupal.org/node/306889#comment-1011306
#16
seutje,
Thank you! Your fix in #13 worked perfectly.
EDIT: I had to add this fix to my admin theme too, otherwise I got the error again and things like the Views2 admin interface stopped working.
Do you want me to ask my host why they don't allow the .cookie filename?
Maybe they know why it is blocked.
Cheers!
#17
I wouldn't rly call it a fix, it's more like a workaround :x
but yeah, please ask them, maybe they can make it sound logical to me