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.
With Views and Views Bulk Operations, I want to bulk edit a field linked to the files.
But nothing is done and I see the following error in the log messages:
Skipped <em>action name</em> on file <em>filename</em> due to insufficient permissions.
Looking in VBO code I found out that entity_access($op, $entity_type, $entity, $account)
send false even if I'm admin.
Is it a known issue?
Anyone could please help me getting through that?
Comments
Comment #1
Thithi32 CreditAttribution: Thithi32 commentedApparently entity_access is calling entity_metadata_file_access and not entity_file_access
Comment #2
Dave ReidI believe this was fixed with #1818068: Add "access callback" to file_entity_entity_info_alter()? Can you try updating to the latest 7.x-2.x of file_entity, clearing caches and checking again?
Comment #3
Thithi32 CreditAttribution: Thithi32 commentedUnfortunately I'm using the last dev version (7.x-2.0-unstable7+15-dev). I don't understand why entity_file_access function isn't registered as the file entity access function. Instead it is entity_metadata_file_access ...
Comment #4
Thithi32 CreditAttribution: Thithi32 commentedI still haven't found how to solve it. Anyone can help me debug that issue?
Comment #5
keesje CreditAttribution: keesje commentedpossible solution:
http://drupal.org/node/1831578#comment-6977496
Comment #6
gmclelland CreditAttribution: gmclelland commentedI'm using the latest devs. I don't get the permission errors, but for some reason when I try to use the VBO at admin/content/file it doesn't seem delete the files or update them? It goes through the motions, but nothing ever happens.
Note: I'm using all the latest dev versions of the modules including the admin_views module. This issue might be related to my issue #1256946: Provide a default files admin screen via Administration Views.
Comment #7
rooby CreditAttribution: rooby commented@gmclelland:
I have the same setup as you with the symptoms you describe, however I wager that if you check your watchdog logs you have the permission errors in there.
I agree with keesje that this is likely a duplicate of #1831578: Use file_entity_access() callback when file_entity module is present as the patch in there fixes/works around it for me (although it is likely not the final solution).
Comment #8
gmclelland CreditAttribution: gmclelland commented@rooby - Your right the patch #1 at http://drupal.org/node/1831578#comment-6690058 fixes the problem for me. Thank you
Comment #9
Devin Carlson CreditAttribution: Devin Carlson commentedI don't think that anything can be done on the File entity side to solve this problem.