On every Drupal site I do, I add a view that's just tables of all content on the site, grouped by content type. I use Weight on most of these sites, and I always separate the content types with weight into a Views attachment, and add the Weight field so the table rows are draggable.
I've done this at least half a dozen times now without issue. But for some reason, on the site I'm currently working on, some of the tables that should be draggable are not. They show up as expected in the Views preview, but not on the actual page.
Here's a screenshot of the Views preview of my attachment. You can see the drag handles right where they should be. But here's the actual view; the first table gets the drag handles it should, but the rest don't.
There are no Javascript, PHP, or Watchdog errors generated when creating, updating, or viewing this view. This happens regardless of the theme; even if I view the page in the admin theme, where it works in the preview, it's broken on the actual page. I've flushed the cache, run update.php, and run cron multiple times. No use.
I'm at a loss. What could be causing this?
Comments
Comment #1
lanny heidbreder commentedI should note that I'm running Weight 7.x-2.1, Views 7.x-3.5, and Drupal 7.15.
Comment #2
davisbenThere could be a bug with grouping tables, although I couldn't reproduce this. Could you check to see if all rows have the draggable class?
Comment #3
lanny heidbreder commentedBoth the non-draggable and draggable rows do have the "draggable" class. However, the broken tables do NOT have the "tabledrag-processed" class.
Comment #4
davisbenI'm unable to reproduce this on a clean install. It's possible there is a conflict with another module or theme. Do you know if there are any other theme or preprocess functions on the view?
Comment #5
lanny heidbreder commentedI finally did the disable-check-reenable dance down my entire Modules list, and found that jQuery Update was causing the problem. When running jQuery Update 7.x-2.2 alongside Weight 7.x-2.1, in my particular scenario, it breaks. I already can't remember why I turned on jQuery Update in the first place, so I'm leaving it off for now, but I'm about to retest the whole site in IE in case it was the reason.
Can you duplicate it now?
Comment #6
davisbenI am able to reproduce the bug after enabling JQuery Update. I'm moving this issue to that queue in hopes that someone there knows what's going on.
Comment #7
lanny heidbreder commentedUpdating the title to something a bit more descriptive and bumping the version number. Issue still applies to 2.3.
Comment #8
ConradFlashback commentedSub, same problem.
Weight doesn't work with jquery update.
Comment #9
markhalliwellThis sounds like a jQuery version/API deprecation issue and can resolved in the 7.x-3.x branch by either:
Comment #10
cristiroma commentedAnother headbanging issue I've encountered is with view using Table formatter. If in the Settings screen of the Table formatter sets the default sorting on a specific column, the draggable views is not working properly:
1. weight is not saved correctly
2. is always sorted the same
You should set the default sorting to None.