Hello,
I've been trying to use the imgAreaSelect 0.4.2 plugin (http://odyniec.net/projects/imgareaselect/)
with Drupal 5.8 but have had no luck.
Finally i removed the files from drupal framework and took it to a simple test area where i created a test file for using the
vanilla jQuery 1.2.6 and another file which uses Drupal's jquery.js file.
The test case works for vanilla 1.2.6 js file but breaks down for drupal's jquery.
I've attached the relevant 6 files
The error i get in when using Drupal's jquery is
"jQuery(this).data is not a function" - which is on line 344 of the file jquery.imgareaselect-0.4.2.js "if (jQuery(this).data('imgAreaSelect'))"
Has anyone seen this problem before ? and knows a fix or how to go about debugging this ? Also, the drupal's jquery.js is in packed format making it very hard
to debug using firebug. Any tips on how to get the unpacked jquery.js for drupal 5.8 ?
Thanks.
Yashesh Bhatia
p.s. Using the attached files
1. Download the 6 attached files into /var/www/html/testImgAreaSelect/
2. please remove the .txt from the 3 javascript files viz. jquery.drupal5.8.js.txt jquery.imgareaselect-0.4.2.js_.txt jquery-1.2.6.js_.txt
3. Click on http://localhost/testImgAreaSelect/test_vanilla.html and http://localhost/testImgAreaSelect/test_drupal.html to see the error.
| Attachment | Size |
|---|---|
| test_drupal.html | 1.41 KB |
| jquery.drupal5.8.js_.txt | 18.89 KB |
| jquery-1.2.6.js_.txt | 97.85 KB |

Comments
all 5 attachements did not go thru.
here's the tarball - http://204.14.193.150/testImgAreaSelect.tgz
and the test samples
http://204.14.193.150/testImgAreaSelect/test_vanilla.html
http://204.14.193.150/testImgAreaSelect/test_drupal.html
thx.
yashesh
jQuery Update module
Hi yashesh,
sounds like you need jQuery Update module - http://drupal.org/project/jquery_update. Make sure to use the 5.x-2.0 version which will give you jQuery 1.2.6 - and also be sure to read the README.txt file for instructions on how to install.
Katherine
jquery_update worked fine..
katherine.
thx.. that worked perfectly fine.
yashesh
p.s. i misread the drupal 6.3 and 5.8 announcement and hence the confusion that 5.8 did include an upgrade to jquery 1.2.6.
"Drupal 6.3 and Drupal 5.8, maintenance releases fixing problems reported using the bug tracking system, as well as security vulnerabilities, are now available for download. Drupal 6.3 also includes some changes to the installer to prevent file ownership issues on shared hosts; upgrades jQuery to version 1.2.6;"
Block module in 5.8 is breaking JS
The title says it all. Try rolling back the block module to 5.7 and see if that works. Some update they did in it is breaking a lot of modules that rely on JS. Some kind of theming error?
Dave