Skip Navigation

[Resolved] Add Media fails from CRED front end if user role is not Editor or Administrator

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by Amr 4 years, 1 month ago.

Author
Posts
#1844615

Amr
Screen Shot 2020-11-14 at 2.32.44 PM.png
Screen Shot 2020-11-14 at 2.39.15 PM.png
Screen Shot 2020-11-14 at 2.04.36 PM.png
Screen Shot 2020-11-14 at 2.46.26 PM.png

We created a CRED form that allows Subscribers to update pages from the front end including uploading/attaching an image using the "Add Media" button. The problem we are facing is that the "uploading of the image part" only works when the user role is "Editor" or "Administrator". With any other role, we get the error message: "Sorry, you are not allowed to attach files to post."

We used the "User Role Editor" Plugin to create a new role cloned after the "Subscriber" role and called it "Superuser" and we added the necessary permissions like edit_posts, edit_others_posts, edit_pages, edit_others_pages, publich_posts, publish_pages, edit_published_apge, edit_published_posts. We even gave this new role the same deprecated levels as the editor role like level_0 thru level_7. And it still does not work.

See Attached Screenshots.

It looks like you already have a similar issue reported in:

https://toolset.com/forums/topic/you-dont-have-permission-to-attach-files-to-this-post-wysiwyg-media-button/#post-385731

We appreciate your assistance in this matter.

Thank you.

#1844669

Amr

I resolved the above issue by using "Access Control" and giving the user role access to "Publish", "Edit own" and "Edit any" to Pages which is the post type that the CRED form is modifying.

Thanks