Support » Plugin: Gravity Forms: Post Updates » Can’t delete attached files

Viewing 4 replies - 1 through 4 (of 4 total)
  • Same problem here.
    If I’m logged in as an admin, I can use the Front End form to delete the featured images my authors are uploading. But if they log in (with their authors’ capabilities) the Delete button doesn’t work.

    Any help please? It would be very appreciated!

    Hi, I am also having this issue.

    I thought it was related to user roles, as admins can delete the files, but giving the delete_posts and delete_others_posts capabilities (which are required for editing and deleting media, as they are post types) to an author doesn’t help.

    What I’ve also noticed is that when you press delete as an admin, they still remain uploaded in the Media Library.

    Okay, so I tried giving the author the same capabilities as an admin, yet they still can’t delete images (but like I say, deleting doesn’t actually remove from the media library) so I’ve concluded this isn’t a user role issue…

    Looking into gravityforms-update-post.php (the plugin), I located the piece of code that calls in the images and delete links, but they’re not wrapped in any code that determines if the user is an admin (i.e. is_admin).

    Also, gravity forms does add it’s own user capabilities too, but I’ve tried turning all of these on and it still does nothing such as gravityforms_edit_forms.

    So I’m stuck… I’ll continue investigating. There’s obviously some difference between being and admin and another user type (author, editor etc).

    I’ve not checked whether editor can edit the page actually… may do that now.

    Okay, my work on this has finished and we’ve found a work around that should work for us.

    We had set up a user registration form (with the User Registration Add-On for gravityforms). When a user registered, they were added to a custom role we had set up. Changing this role to one of the default WordPress roles (we’re using subscriber in this case), fixes the issue and the delete button on the edit form works again.

    So the issue appears to be related to the custom role.

    I’m not sure what other work has been done on the site I’m working on, or whether the custom role has any special privileges (i.e. has_cap()), but if so, they can be transferred to the subscriber role, and any current users can be swtiched to subscribers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t delete attached files’ is closed to new replies.