Closed (fixed)
Project:
DraggableViews
Version:
2.1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2021 at 21:50 UTC
Updated:
5 Nov 2024 at 20:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mimran commentedSpecifically now you need to select the view handler as showed on the image this is a fix added to 2.x version

Comment #3
bsufan17 commented@mimran this does not solve the problem. I'd like to be able to manually type the row weight I want to apply to an item but the text field for the row weight is empty and won't allow me to type anything.
Comment #4
volegerDon`t set the draggable sort plugin in the fields as the first column in the table.
And yes, the table display plugin is the one that works properly with the module for weight source view.
Comment #5
bsufan17 commentedI don't have it set as the first column. It's the last column actually. I can drag and drop the order, but if I use the "show row heights" link to be able to edit the row weights by typing the number I want, the text fields are empty and disabled.
Comment #6
volegerAccording to #5 description of the behavior looks like it could be the client-side issue. Did you check the browser dev console? Maybe there are some JS error messages?
Comment #7
bsufan17 commentedChecked the console and there are no js errors, or any warnings for that matter. I also tried disabling js aggregation. The attached screenshot shows what I'm seeing.
Comment #8
jasminewu commentedI got the same issue with Seven theme. And I found that's because the draggableviews th has a class: select-all. And [width: 1px;] apply on th .select-all.
My solution: hook_preprocess_views_view_table() remove the class: select-all
Comment #9
bsufan17 commented@jasmineWu Thank you! That solved it for me as well. I am using the Claro theme on other sites, but the solution was the same there as well.
Comment #10
anagomes commented@JasmineWu Thanks, I was having the same issue using the Gin theme, and your suggestion solved it for me. I'll leave an example of code if anyone needs it:
Comment #11
altcom_neil commentedIs there any reason that this shouldn't be done in the module itself - does removing this class cause any problems.
Attaching a patch to remove.
Comment #12
j_s commented#11 breaks the page if there are no table headers. This case can happen if fields are added and their labels are removed. I had this happen when I had another view display that has fields but no labels. I cloned the display and re-arranged the new page so that it could act as a reordering page using the same fields as the original display. But since it had no labels to make into table headers, it white-screened the reordering page and gave an error.
Attached is an updated patch to check if
$variables['header']['draggableviews']['attributes']is set.Comment #13
thanksneco commented#12 patch works perfectly in Drupal 10 as of Jan 2024.
Also, if you don't want to patch the module, you can use #10 example in your site's admin theme and that will fix the issue as well.
Thank you everyone for your fixes with this issue!
Comment #14
joegraduateComment #15
joegraduateWe've been using the patch from
#11#12 on a large number of sites successfully since September 2023.Comment #16
devad commentedPatch #12 fixed the issue for me.
DraggableViews 2.1.4
D10.3.1
PHP 8.1
Comment #18
volegerCreated MR based on #12 patch
Comment #19
istryker commentedI was able to reproduce it on a fresh Drupal 11 installation with draggableviews demo submodule installed. Viewing the demo table order table, I did not see any problems as described. I did see it broken on the view edit "preview". MR fixed it. Merged.
Comment #20
istryker commentedComment #21
volegerIt not merged yet
Comment #22
istryker commentedLooks like you are correct. I click the merge button, but it fails. I will take a look at why.
Comment #24
istryker commentedProblems with merge requests. Fixed the coding standards but still had problems with PHPUnit. Pushing manually
Comment #25
istryker commented