Hi,

When this Plugin activated, Users other than Administrators not able to upload images. I am having a Custom Post Type with few Custom User Roles with proper Capabilities set. If I activate this Plugin, non-Admin Users cannot able to upload images (upload working fine once deactivated the Plugin) – getting ‘Sorry, you are not allowed to attach files to this post.’ error.

I already checked ‘Allow Contributors & Subscribers to upload avatars’ option but still upload not working for Custom User Roles.

This issue has been already reported by someone – https://www.flippercode.com/question/users-cant-upload-files-when-wp-user-avatar-acitivated/ & https://www.wcvendors.com/help/topic/error-in-uploading-image-not-allowed/.

Digging deep, this one from WordPress core file fails – ‘/wp-admin/includes/ajax-actions.php’ around line 2080.
if ( ! current_user_can( 'edit_post', $post_id ) ) {

Can you please able to look and resolve ASAP?

Thanks.

Public
Hello,
Thank you very much for contact us, Maximum users of the site are mainly contributor or subscriber, So, we have provided the checkbox in the backend. May i know what roles you are assigning to your users by default so we can test on it and let you know. You can also send me wp admin details at support@flippercode.com so we can check it at your end.

Thanks
#1
Public
Hi,
Thanks for getting back.
We have created couple of custom User Roles – Customer & Venue Owner and the Capabilities are given below (few might not necessary).

  1. read

  2. edit_posts

  3. upload_files

  4. edit_published_posts

  5. publish_posts

  6. delete_published_posts

  7. edit_others_posts


We have also Emailed you the Admin Panel credentials.
Thanks.


#2
Public
Hello,
Yeah, we have received your mail and we are inspecting.

Thanks
#3
Public
Hi,

Previously we have commented out WordPress core around 2080 in ‘/wp-admin/includes/ajax-actions.php’ to make this functionality working. We have replaced the original code now but still it seems working. Did you updated anything on the Plugin?

Thanks.
#4
Public
Hello,
Sorry for the delay, I was on leave so I couldn't reply you. I already sent you mail 3 days ago where I have abled to upload an avatar as a non-registered user.

Thanks
#5
Public
Hi,
Thank you very much for your response and sorry for the late reply.
Yes, User Avatar working fine but my custom User Roles unable to upload anything to a Custom Post Type.
I have created a Custom Post Type named 'Venues' and both custom User Roles - Venue Owners & Customers will upload images via Front-End. This functionality is not working and we are getting this error - 'Sorry, you are not allowed to attach files to this post.'. If we disable your Plugin, its working fine.
We have emailed you the credentials to support@flippercode.com in order to check.

Thanks.
#6
Public
ok, we are checking at our end and back to you very soon.

Thanks
#7
Public
Hi,
Any updates regarding this?
Thanks.
#8

Please login or Register to Submit Answer