I recently downloaded the dev version of text_resize to utilize the fixed reset button patch that was recently committed and noticed another issue with the jquery.cookie plugin. It appears jquery.cookie is being referenced on line 151 of text_resize.module in hook_init but is no longer included with the module. (Which it probably doesn't need to be as it is included with Drupal). Anyway, when a user is not logged in jquery.cookie is not loaded by default by Drupal and the font resizing breaks. While viewing the chrome console I see the following errors:
text_resize/jquery.cookie.js?m40p3f 404 (Not Found)
Uncaught TypeError: Object function (j,s){return new b.fn.init(j,s)} has no method 'cookie'
I believe changing line 151 from this:
drupal_add_js(drupal_get_path('module', 'text_resize') . '/jquery.cookie.js', 'file');
To:
drupal_add_js('misc/jquery.cookie.js', 'file');
Should probably solve the problem.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | non_existent_cookiejs-1578522-0.patch | 919 bytes | blischalk |
| #1 | non_existent_cookiejs-1578522-0.patch | 935 bytes | blischalk |
Comments
Comment #1
blischalk commentedI have created a patch for the fix I mentioned previously.
Comment #2
blischalk commentedTypo in previous patch. Use this instead.
Comment #3
jlea9378 commentedPatch in #2 solved the problem for me. I hope this can be committed in the next dev release. Thanks.
Comment #4
HumanTex commentedAfter finding this issue/patch to solve another problem ('file not found' for lang translation), I came across an additional caveat to using a "drupal_add_js" fix when it involves pointing to core JS files.
Apparently, using that particular call on core files will foul up the load order for js libraries. http://drupal.org/node/1532566#comment-5869022
Comment #5
attheshow commentedDuplicate of #1822526: Wrong jquery.cookie call?