Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Looks I can't bulk delete entity on entity list page.
Can add a operation form on list top, like content management page?
Comment | File | Size | Author |
---|---|---|---|
#15 | how_bulk_delete_entity-2028353-15.patch | 17.18 KB | joelpittet |
| |||
#2 | 2028353bulk-delete-entity-3.patch | 9.91 KB | ycshen |
#1 | 2028353bulk-delete-entity-2.patch | 18.59 KB | ycshen |
Comments
Comment #1
ycshen CreditAttribution: ycshen commentedhi,
i create a patch and hope it will help
Comment #2
ycshen CreditAttribution: ycshen commentedupdate patch
using views vbo create a tab in 'admin/structure/entity-type/{$enity_type}/bulk_manage'
it is easy to use this ui
Comment #3
imclean CreditAttribution: imclean commentedThis sounds like a good approach. It might be worth converting all admin pages to views.
See: #1434224: Change entity admin pages to use Views
Comment #4
computerbarry CreditAttribution: computerbarry commentedHi
I think I'm having the same problem.
Currently have about 50 entities I would like to delete in my bundle list but when I select them all, there is no group delete button?
Is this patch related?
How can I delete all the selected entries?
Right now, I only have the option to delete each entity one by one which is taking a lot of time.
Any suggestions thanks.
Barry
Comment #5
imclean CreditAttribution: imclean commentedUse views bulk operations and create your own view. That way you can add whatever fields you like.
Comment #6
computerbarry CreditAttribution: computerbarry commentedThanks imclean
Not sure how to do this, do you have any information on the setup? And do I need to download the patch?
I'm also writing EFQs which display my entities, not currently using views for the output if that makes any difference?
Barry
Comment #7
imclean CreditAttribution: imclean commentedNo need for any patch. Make sure you have Views and VBO installed and enabled. Create a new View of the type of your custom entity and add what fields you'd like.
Make one of the fields a VBO action field (I think it's called).
Adding exposed filters let you list entities based on whatever criteria you'd like then you can mass-delete them as required.
Comment #8
computerbarry CreditAttribution: computerbarry commentedCool, just reading up on VBO before I get everything installed, first time I've heard of this.
Would I need to match the fields in the bundle?
Barry
Comment #9
Jānis Bebrītis CreditAttribution: Jānis Bebrītis commentedWell, can we remove the checkboxes from builtin display then? Because i checked them all and there are no action buttons or anything, they are useless.
Comment #10
fmizzell CreditAttribution: fmizzell commentedAgreed, checkboxes that do nothing is terrible UX. Adding the delete button is probably easy and will make the the checkboxes useful. Hopefully that is what the patch that I have not looked at does.
Comment #11
joelpittetLet's get some eyes on the patch by setting it to needs review.
Comment #12
joelpittetFYI, this works in #2 but it would be nice if it replaced the existing listing that has the dead checkboxes with this one.
@fmizzell would you be willing to add views and VBO as a dependency? It does make short work of this.
This is minor but you don't need to include this file in files[]. Files[] really is just a autoloaderesque thing for classes.
Comment #13
fmizzell CreditAttribution: fmizzell commentedI have not looked at the code, but would it be possible to make it a soft dependency?: If views and vbo are there, then lets give them the nice table with the integration, otherwise, the simple table without the useless checkboxes.
Comment #14
joelpittetSoft dependency sounds good, there seems to be one on views. The only problem I see with the current implementation is that it's creating a new view for each entity type because they each have a base_table. I wonder if that can be abstracted somehow so that one view can represent all eck base_tables?
Comment #15
joelpittetmodule_exists()
check.@todo
This can be improved a bunch I'm sure but just trying to push this idea forward a bit.
Comment #16
fortis CreditAttribution: fortis at Redditor commentedGreat, I will try