Needs work
Project:
Drupal core
Version:
main
Component:
file.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2015 at 13:44 UTC
Updated:
17 Feb 2026 at 10:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehner.
Comment #2
jibranI don't think this is a novice task because we don't have any actions for files in core.

See
Anyways here is the start.
Comment #3
dawehnerAh interesting ... I think someone has to work on generic entity plugings to delete an entity for example
Comment #4
jibranHere we go.
Known problem always access denied.
Comment #6
jibranschema fixes.
Comment #8
jibranMore schema fixes.
Comment #10
jibranEven more schema fixes.
Comment #11
jibran:/
Comment #12
jibranAdded some asserts. It should fail now.
We need a follow up for that to add the delete permission.
Comment #14
jibranoh
Comment #16
jibranhuh! another one.
Comment #18
nchase commentedits not only that there is no VBO. It also not possible to edit files at all. There is no "edit link" that lets me change the file...
Comment #23
grimreaperHello,
Thanks for the patch. Here is a rebased version.
I didn't have time to change the OO code, I think the following files will fail because of changes in core (PhpStorm does not detect classes):
- core/modules/file/src/Tests/FileListingTest.php
- core/modules/file/src/Plugin/Action/DeleteFile.php
- core/modules/file/src/Form/FileDeleteMultiple.php
Also here is my review, I made modifications in the uploaded patch.
Changing node to file.
Should be file_bulk_form to be consistent with the node and the user version.
I need the VBO feature for #2839304: Create actions to deploy individual entities, already created a patch for the taxonomy terms #2839351: VBO for taxonomy term.
I will be back in a week.
Comment #24
grimreaperHello,
I have tested the patch from comment 23, and the base to provide VBO for files works. I tested with an action from my module.
Now I will see to fix the default "delete" action provided by the patch.
EDIT: Sorry, I have tested with patch from comment 16, not comment 23.
Comment #25
grimreaperHere is a patch (and an interdiff from comment 23) that fix the OO code.
I add two screenshots.
The permission "administer files" does not exist anymore so I put "access files overview" for the delete confirm form. I don't know if there is a better permission.
Comment #27
grimreaperFixing automated tests.
Text on the submit button and URL had changed.
Comment #29
grimreaperFixing automated tests.
The site on the CI is in a subdirectory.
Comment #31
grimreaperHum, anyone having a tip to avoid this URL check problem with site in a subdirectory?
And also I do not understand the error in the Kernel test on the default config.
Comment #33
grimreaperHello,
After seeing an article on VBO and actions (https://www.flocondetoile.fr/blog/create-action-custom-mass-updates-drup...), I realized there is no need to add a view field (and so to modify file.views.schema.yml and FileViewsData.php) as it generated automatically if there is at least an action for the entity type.
So here is an updated patch against the 8.3.x branch.
It would be cool to have for all content entites at least a default "delete" action.
Comment #38
mpp commentedAdded reroll.
Comment #39
zero2one commentedPatch #38 works on 8.6.15.
Comment #44
fernly commentedReroll voor 9.1.x.
Replaced non-existing user.private_tempstore by tempstore.private service.
Comment #45
fernly commentedPatch 44 was missing pieces of refactoring.
Reroll voor 9.1.x.
Comment #51
fernly commentedPatch rerolled against 10.1.x.
Comment #52
smustgrave commented11.x is the current development branch so code has to be merged there first and backported in applicable.
Adding new form to the UI should include screenshots in the issue summary.
Also encourage using MRs as patches are being phased out.
Comment #55
gauravvvv commentedComment #56
smustgrave commentedPer 52
Comment #58
fernly commentedPatch for people needing a stable patch in their project, based on the latest merge request.
Comment #59
nicxvan commentedThere is an MR, hiding patch files.
Comment #61
kim.pepperRebased on 11.x
Comment #62
kim.pepperLooks like some legit test fails.
Comment #64
fernly commentedRolled out patch against drupal 11.1.7, based on the latest MR state.
Comment #65
fernly commentedStable patch based on current MR state. Works for Drupal 11.2.x.
Comment #67
fernly commentedStable patch against D11.3.3, based on the last patch.