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.

Comments

blischalk’s picture

StatusFileSize
new935 bytes

I have created a patch for the fix I mentioned previously.

blischalk’s picture

StatusFileSize
new919 bytes

Typo in previous patch. Use this instead.

jlea9378’s picture

Status: Active » Needs review

Patch in #2 solved the problem for me. I hope this can be committed in the next dev release. Thanks.

HumanTex’s picture

After 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

attheshow’s picture

Status: Needs review » Closed (duplicate)