The jquery_update is not replacing the core tabledrag.js with the new one fixed in #350275: Update to jQuery 1.3.2 and really well added to jquery_update in replace/.

In the $scripts variable the tabledrag.js is not considered core, is considered module but in the jquery_update_get_replacements is defined as core.

Changing this wrong classifications, do everything work great.

So if there is not two types of scripts to search and replace, then we can simplify and increase preformance with the replacement loop in jquery_update_preprocess_page and replace only module types scripts
(simplifying as well the jquery_update_get_replacements() function)

That patch fixes #366250: jQuery 1.3.x and Views UI, and now it is working great with views 2.0, and any other tested/fixed module ( )
and I think that this views 2.0 issue was the last one to avoid a new release of this so good module.

Members fund testing for the Drupal project. Drupal Association Learn more


markus_petrux’s picture

If jquery_update needs to update 'misc/drupal.js' in the future, then this simplification will not work.

Maybe it would be enough moving the entry for 'misc/tabledrag.js' from the 'core' array to 'module' in jquery_update_get_replacements() ?

Flying Drupalist’s picture

Can't we go to that if we ever need to update drupal.js? For now we can enjoy our increased performance.

markus_petrux’s picture

It is an option indeed, but it may break other modules that rely on the current structure of the data returned by jquery_update_get_replacements().

For example, a few weeks ago I started to co-maintain the Ajax Load module, and there was an issue that I was only able to fix by using the same proprocess as jquery_update. Reference: #389148: Tracking loaded javascripts and support for jquery_update

The problem was, and it could happen under other similar use cases, that jquery_update does its job when theme('page') is processed, but if you're using AHAH that needs to dynamically load scripts/stylesheets, you need to do all the stuff by yourself.

So I would prefer to keep the current structure if possible.

koshea’s picture

Status: Needs review » Needs work

I applied the patch and am still getting javascript errors when trying to drag and drop on views. Subscribing..

jeff00seattle’s picture

I am also experiencing a similar problem when dragging items within Rearrange fields.

attheshow’s picture


darrindickey’s picture


jcmarco’s picture

Title: jQuery 1.3.x and Views UI. (Problem replacing modified version of tabledrag.js) » jQuery 1.3.x (Problem replacing modified version of tabledrag.js)
Status: Needs work » Needs review
451 bytes

I was checking the jquery_update issue list, and I found that I mistakenly I forgot to upload a new patch with @markus_petrux comments at #5.
I realized that it was a change out of the scope of this issue, and this kind of changes probably needed a new release.

Here is the patch with just the classification fix.
Anyway this patch didn't solve the issues with the new tabledrag.js in some modules, but solved the error with the new tabledrag.js insertion.

CPyle’s picture

I noticed that applying the patch in #8 results in slightly better behavior in modules (ie. Views) but breaks tabledrag in core.

Leaving the tabledrag entry in both the 'core' and 'module' arrays makes it behave correctly in both.

Views 2 rearranging of items still behaves wonkily, in that the row will stick to the cursor after you release your mouse button, but clicking once usually fixes it. I'm pretty sure this issue is still in the Views queue.

kenorb’s picture

Status: Needs review » Reviewed & tested by the community

#9 patch is working fine, many thanks.
The only thing is that you need to click second time to release.

kmonty’s picture

Patch #9 is working well for me, although I am still having issues with having to click to release in views. Not perfect, but definitely a significant improvement.

Flying Drupalist’s picture

I think #9 is already in the latest dev.

Still need a full solution though.

markus_petrux’s picture

The patch in #9 works for me.

Also, I have re-opened the Views issue because the problem with "I am still having issues with having to click to release in views" lives in Views. Please, check the fix and explanation posted here: #366250: jQuery 1.3.x and Views UI

jcmarco’s picture

With last solution in #366250: jQuery 1.3.x and Views UI by @markus_petrux, where he fixed the existing issue with views (in my jquery_update pending issue list that was the last pending one, we are really close to end with the jQuery migration to 1.3.2 in D6.
In any case, with @markus_petrux solution, I found that both patches, #8 and #9 work fine with the views issue. But probably only adding the tabledrag.js to one of the categories should be enough.

jcmarco’s picture

There are still issues dragging in lists, as in blocks admin or filefield cck form elements with patch #8
but with patch #9 with tabledrag.js in module and core both cases work fine and with markus_petrux fix for views works fine as well.
(tested with IE7 and Firefox)

So patch #9 is working

jcmarco’s picture

I haven't seen any issue with jquery 1.3.2 since last views module patch for dragging.

Why not commit a patch for jQuery 1.3.2 even more when we need to test and migrate all existing js for D7 that is running in jQuery 1.3.2?

sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting, reviewing, and testing! This was already committed to 2.x, but without changelog entry, nor any comment explaining the WTF. Fixed that.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sinasalek’s picture

Status: Closed (fixed) » Active

Tried the latest dev release and getting this error? (I cleared the cache BTW)

Error: cell[0] is undefined
Source file: jquery_update/replace/tabledrag.js?g
Line: 130
sinasalek’s picture

Status: Active » Fixed

False report, it seems that it was cause by wysiwyg_imagefield module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pwaterz’s picture

I was having the same problem on drupal core 6.19, jquery update 6.1.1 and jquery ui 6.x-1.3, running jquery 1.3.2 and jquery ui 1.7. I tried the patch #9 from above and did not work. To fix the problem download the development version of jquery update, which at the date of this post is 6.x-2.x-dev.