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?


#32 l10n_client-fixed.zip3.67 KBthejalal
Members fund testing for the Drupal project. Drupal Association Learn more


drupallfm’s picture

Version: 5.x-1.0 » 6.x-1.3

Same problem with me, using 6.x-1.3.
I click in the "Translate Text" and no pop-up window....

drupallfm’s picture

Tryed with Firefox and worked! seem to be a ie7 problem or configuration, can anybody help with this issue?

azuledu’s picture

I've tried with Firefox 3, with IE7, with Drupal 5.7 and with Drupal 6.2 ........ and it never works.

-Anti-’s picture

> 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.


azuledu’s picture

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!

-Anti-’s picture

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

But that doesn't work either on my server.
Glad you got it working though.


seutje’s picture

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

vlad.leo’s picture

Status: Active » Closed (fixed)

Please check version of module 6.x-1.3 or 5.x-1.0 very big diff?

Check your software.

-Anti-’s picture

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.03 3.3 (sorry, my mistake) on Windows 2000.

Any ideas??

seutje’s picture

Version: 6.x-1.3 » 6.x-1.5
Status: Closed (fixed) » Active

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 ;)

azuledu’s picture

I'm not mean mod_security, I mean "ModSecurity application", an application independent of Apache that some ISP use.

-Anti-’s picture

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 -

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.


seutje’s picture

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
print $scripts;


print 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

Gábor Hojtsy’s picture

Why is that nobody reported this naming bug yet on http://plugins.jquery.com/project/issues/Cookie?categories=bug ?

seutje’s picture

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

-Anti-’s picture


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.


seutje’s picture

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

SepehrLajevardi’s picture

Same Javascript error was driving me mad when I deployed the application on my client's server.
File names containing .cookie has been ignored by the server due to existence of that dead mod_security Apache module.

Gábor Hojtsy’s picture

Status: Active » Closed (duplicate)

The .cookie problem mentioned here several times is duplicate of #306889: Fails to load jquery.cookie.js (hosting problem).

bcpoland’s picture

Version: 6.x-1.5 » 6.x-1.7
Priority: Normal » Critical
Status: Closed (duplicate) » Active

I am having no luck getting the "Translate Text" area to pop up at all using Drupal 6.16. I've tried IE 7 PC, FF3.6 (Mac&PC), Safari4 (Mac&PC), Chrome5 (Mac&PC), as well as switching themes.

I modified htaccess as per #6 as tried the mod in #13, both didn't fix it. Firebug shows that the file "jquery.cookie.js" loaded in the browser, so I don't think its the cookie problem.

What other steps should I take to track down the issue?

UPDATE: I discovered it was a conflict between Localization client and Image Assist.

Zarevac’s picture

Same problem, and I agree with bcpoland, after disabling Image Assist the problem disspeared.

Gábor Hojtsy’s picture

It would be great if you could help us and identify the ways l10n_client and image assist collide. I'm not using these in conjunction, so no experience.

seutje’s picture

I solved my problem with imagefield_assist and l10n_client by adding "edit-target" to the exclude textareas list of imagefield_assist

I imagine image_assist to work the same way (as imagefield_assist code was based on that), so the same workaround should apply

Anonymous’s picture

I'm trying to use this module. Whenever I click "save translation" it jumps to /i18nstrings/save, with a WSOD white screen.

Anonymous’s picture

Version: 6.x-1.7 » 6.x-1.x-dev

Im using the latest devx.

seutje’s picture

@morningtime: it probably throws a JS error right before it does the page load, which would stop execution of that function and cause the submit event to not be prevented. Can you please check this (e.g. press "save translation" and right after that, hit the escape button) and paste the error it's throwing?

nhck’s picture

I haven't gotten it working in any of the browsers - nor do I get an javascript error. The funny thing is that it works when I use ctrl+shift+s

holydrupal’s picture

Component: User interface » Code
Category: support » bug

Not working with Drupal 6.19 too.
Nothing will be done by pressing the button, tested with FF 3.6 and IE 8

askibinski’s picture

Same thing here. No JS errors, no popup when clicking the bar but it does slide out when you click ctrl+shift+s.
Probably a conflict with another module somewhere down the line though..

stefd’s picture

I had the same issue in D7, and can confirm that in my case it is caused by the jquery.cookie.js script being blocked by my server (you can check for you own server by visiting yoursite.com/misc/jquery.cookie.js).

I took inspiration from #13 above, and renamed the file to jquery_cookie.js (note underscore). I then had to change two files where the .js was used: /modules/system/system.module and /sites/all/modules/l10n_client/l10n_client.module.

Hardly a longterm solution, but it works and I don't know how to propose a more definitive fix (being new to D7). I will see if my hosting provider can relax the MODSecurity rule which is the cause of all the trouble...

Gábor Hojtsy’s picture

The jquery.cookie.js issue for core is at #522646: jquery.cookie.js incompatible with Apache mod_security by default and has tips on fixing mod_security.

thejalal’s picture

Version: 6.x-1.x-dev » 6.x-2.0
Priority: Critical » Major
3.67 KB

I have the same issue:
$.cookie is unknown function in l10n_client.js

I'm not using mod_security, so it is not that. The problem is solved by making the jQuery.cookie function part of the Drupal.behaviors object. I'm not sure this is the 'correct' way to go about it, but it works for me and doesn't require renaming files and such.

I've attached the modified files.

JohnForsythe’s picture

had the same issue. no mod_security. the browser definitely downloads the js ok (the contents of the file are visible in firebug), but $.cookie never gets defined.

thejalal's solution worked for me.

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is not supported. The same problem was not reported for Drupal 7 for some time, despite some initial reports of Drupal 7 problems above.