Closed (fixed)
Project:
Text Size
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2009 at 14:56 UTC
Updated:
1 Oct 2009 at 17:40 UTC
Just upgraded textsize and got this error:
Fatal error: Call to undefined function jquery_plugin_add() in textsize/textsize.module on line 326
It's fine to add in the requirement for this plugin module, but it's important to check for it first, this would be better for the last line:
if (function_exists('jquery_plugin_add')) {
jquery_plugin_add('cookie');
} else {
drupal_set_message(t('Drupal\'s jQuery Plugin Module Required for textsize functionality'));
}
| Comment | File | Size | Author |
|---|---|---|---|
| textsize_check.patch | 491 bytes | mgifford |
Comments
Comment #1
CZ commentedThanks. Fixed in the 6.x-1.x-dev version.
Comment #2
mgiffordExcellent.. Glad this little module is maintained..
Comment #4
dkruglyak commentedOops, wrong solution!
The fatal error (or "Required" message) happens because textsize_jq_plugin() is called when the module is loaded, which is BEFORE other modules may be loaded, including jquery_plugin. Perhaps not everyone can reproduce this since the load order of file depends on their file system structure.
The solution is to move the following chunk of code, called at the end of textsize.module inside textsize_init() hook:
The fix is tested and works. The same problem needs to be fixed in pagestyle.module.
Comment #5
dkruglyak commentedI should add that the problem is not with "multisite install" per se, even though I do run multiple sites.
Simply under certain filesystem structure (determining the module code loading order?) the module causes the bug.
Comment #6
mrfelton commentedthe fix at #4 works here also.
Comment #7
CZ commentedDone.