Thanks for this awesome module, It will be nice to use 'entity media type' too. (Right now we can use 'node' type).
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | support_media_entity_type-3089597-14.patch | 1.19 KB | dkosbob |
| #11 | support_media_entity_type-3089597-9.patch | 1.53 KB | gooddenis |
| #8 | draggableviews-duplicates-items-3089597-8.png | 44.31 KB | istryker |
| #5 | Screenshot at Oct 24 22-18-14.png | 266.67 KB | gooddenis |
| #3 | support_media_entity_type-3089597-2.patch | 1.68 KB | gooddenis |
Comments
Comment #2
gooddenis commentedWith this patch, you can use 'node type' or 'media type', but not both. Because in the 'draggableviews_structure' table we don't keep 'entity type' and 'parent entity type'.
Comment #3
gooddenis commentedFix getting entity, please use the latest path.
Comment #4
istryker commentedTried your patch with Drupal core 8.7.7, latest 8.x-1.x. I see it does not work with a view of "Media" without your patch. With your patch it still does not work. No draggable + show up on the table.
Looking at the patch, it does look like it should work. What version of Core you using?
Comment #5
gooddenis commentedIt works for me at 8.7.8
Did you see 'Draggableviews: Media' in the 'FIELDS'?
Comment #7
istryker commentedGot it to work. Comitted
Comment #8
istryker commentedWait I think this needs works. After saving 1 view with 3 images, and having the draggableviews demo with 5 items, now there is duplicates. Images go from 3 items to 6, DV Demos goes from 5 to 8. I think its because they have conflicting entity Ids. See attached image.
Comment #9
gooddenis commentedI will try to check it, but right now I don't have much time, Changing the assigned status.
Comment #10
gooddenis commentedComment #11
gooddenis commentedThe problem was with join `draggableviews_structure` table to the view. We should add additional conditions `view_name` and `view_display`.
The SQL query was
LEFT JOIN {draggableviews_structure} draggableviews_structure ON media_field_data.mid = draggableviews_structure.entity_idand I change it to
LEFT JOIN {draggableviews_structure} draggableviews_structure ON media_field_data.mid = draggableviews_structure.entity_id AND (draggableviews_structure.view_name = 'VIEW_NAME' AND draggableviews_structure.view_display = 'VIEW_DISPLAY')Added patch.
Comment #13
istryker commentedTest and committed. I am surprised this hasn't caused other problems with other issues.
Comment #14
dkosbob commentedI'm fairly certain the views_query_alter committed in this issue broke the functionality of the module on my views. Removing it restores expected behavior. Here is a patch that just removes that for anyone who needs it, but it sounds like that may invalidate the work done earlier in this issue.
Comment #15
dkosbob commentedComment #16
gooddenis commentedHello, @dkosbob
Could you provide some information about the problem? Do you have any error message?
This hook_views_query_alter change JOIN
LEFT JOIN {draggableviews_structure} draggableviews_structure ON media_field_data.mid = draggableviews_structure.entity_idto
LEFT JOIN {draggableviews_structure} draggableviews_structure ON media_field_data.mid = draggableviews_structure.entity_id AND (draggableviews_structure.view_name = 'VIEW_NAME' AND draggableviews_structure.view_display = 'VIEW_DISPLAY')Comment #17
istryker commentedIn theory it shouldn't because view display and view name are already added to the database. The commit just adds them to the query.
Comment #18
gooddenis commentedComment #19
istryker commentedReclosing isssue as only @dkosbob is having problems. There are other issue like his in other issues. Marking back as fixed for this issue.
Better solution #3158196: Allow any entity in DraggableViews::getIndex(). This is what I was looking for. It not mid or nid specific.
Comment #21
robertom commentedI have the same problem as @dkosbob
the problem is discussed on #3153830: DraggableViews not working after update to 2.0.0
Comment #22
dejan0 commented+1
same here