Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › issue with new vendors
- This topic has 31 replies, 2 voices, and was last updated 5 years, 2 months ago by WCFM Forum.
- AuthorPosts
- September 7, 2019 at 8:29 pm #80633sdel_nevoParticipant
Hi Guys
there appears to be an issue since the last update
new vendors have access to all users media, this is the same issue that I raised in relation to the affiliates here https://wclovers.com/forums/topic/affiliate-profile-image/
I will attach a video to show the issue
also
new vendors are unable to upload store logos or banner images
when they try I get “Sorry, you are not allowed to attach files to this post.”I’m not sure if the issue is related to the code you provided me that gives vendors staff status as well so there calendars sync two ways
that code is this
//Calendar Sync For vendors - Add Straff Role add_action( 'wcfmmp_new_store_created', function( $member_id, $wcfmmp_settings ) { $member_user = new WP_User(absint($member_id)); $member_user->add_role('shop_staff'); update_user_meta( $member_id, '_wcfm_vendor', $member_id); }, 50, 2 );
Steve
- September 7, 2019 at 8:55 pm #80635sdel_nevoParticipantThis reply has been marked as private.
- September 8, 2019 at 12:31 pm #80720sdel_nevoParticipantThis reply has been marked as private.
- September 8, 2019 at 2:04 pm #80724sdel_nevoParticipant
Hi Guys
I have been doing some further testing, if the site admin creates a new user and gives them store vendor role (from the WordPress backend) but does not assign this vendor to any membership plan (from WCFM membership), this new vendor can log in and upload images and they cannot see all the media on the site only there own.
which is how it should be.
As soon as the vendor is assigned a membership plan vis the (WCFM Membership plugin) this vendor can now no longer upload any media to products, profile or store logo or header images. and can also see all media when selecting media library.
It’s pointing to the update to WCFM Membership – WooCommerce Memberships for Multivendor Marketplace 2.6.6 as the problem.
this is a big problem for meSteve
- September 8, 2019 at 2:51 pm #80726sdel_nevoParticipant
Hi Guys
really sorry to keep bothering you
when I comment out the code to give shop vendors the staff role aswell so the google calendar two-way sync works for shop vendors
//Calendar Sync For vendors - Add Straff Role add_action( 'wcfmmp_new_store_created', function( $member_id, $wcfmmp_settings ) { $member_user = new WP_User(absint($member_id)); $member_user->add_role('shop_staff'); update_user_meta( $member_id, '_wcfm_vendor', $member_id); }, 50, 2 );
the system works correctly
I have commented out this code as it appears to be causing the issue
Steve
- September 8, 2019 at 3:47 pm #80733sdel_nevoParticipantThis reply has been marked as private.
- September 9, 2019 at 9:50 am #80778WCFM ForumMember
Hi,
OK, then please keep this code your live site now.
But we have test this and it works fine. Hope you never install plugin like “User role editor” and manipulate “Shop Staff” user role!
Well, that “admin access” not working for me at your staging site. Please enable that, I have to test this over there.
Thank You
- September 9, 2019 at 11:16 am #80788sdel_nevoParticipantThis reply has been marked as private.
- September 9, 2019 at 2:46 pm #80839sdel_nevoParticipantThis reply has been marked as private.
- September 9, 2019 at 7:57 pm #80915sdel_nevoParticipantThis reply has been marked as private.
- September 10, 2019 at 1:15 am #80958sdel_nevoParticipant
Hi guys
The forum says you replied, but noth8ngs showing here
Steve
- September 11, 2019 at 4:30 pm #81193sdel_nevoParticipant
Hi Guys
I know you are very busy, but have you been able to look into this?
Any vendors that sign up have the issues below
1. they can see all the media on the site when he should only see his own – even if he has not uploaded any images yet!
and
2. they cannot upload any images to his logo, store header, products or profile image as I get “Sorry, you are not allowed to attach files to this post.”
you have access with the login details for my testing site provided in the above private post
Please advise
Steve
- September 12, 2019 at 10:28 pm #81344sdel_nevoParticipant
Hi Guys
I know you are extremely busy guys, but have you been able to look into this issue?
when adding
staff members
delivery drivers
affililiates as shown here https://wclovers.com/forums/topic/affiliate-profile-image/all these user roles are able to access all the media on the site, when trying to upload an image and selecting “Media Libary”
however, they are not able to upload images to there profile, product image or any location as they get “Sorry, you are not allowed to attach files to this post.”
I have commented out of the site the code above that enabled vendors to have shop staff role so the two-way google calendar sync works, if I comment that back in vendors have the same problem when new one’s sign up
Please please can you take a look at this
I have updated all plugins to the latest versions
Steve
- September 13, 2019 at 6:38 pm #81474sdel_nevoParticipant
Hi Guys
i have replied to your email you sent me via the priority support link at 06:44 this morning
steve
- September 14, 2019 at 10:20 pm #81630WCFM ForumMember
Hi,
staff members
delivery drivers
affililiatesall these user roles are able to access all the media on the site, when trying to upload an image and selecting “Media Libary”
– Yeah right, we will take care of this in Group, Delivery and Affiliate addon next update.
Thank you
- September 14, 2019 at 10:23 pm #81631sdel_nevoParticipant
Hi Guys
that’s brilliant
will you also resolve the “Sorry, you are not allowed to attach files to this post.” error when these roles try to add media
Steve
- September 15, 2019 at 1:24 am #81723WCFM ForumMember
Hi,
will you also resolve the “Sorry, you are not allowed to attach files to this post.” error when these roles try to add media
– Where we will show this? Then how this users will able to change profile image?
I think, then it will better to disable change profile image option for these user types, actually that does not have much use!
Thank You
- September 15, 2019 at 2:15 am #81740sdel_nevoParticipant
Hi guys
That sounds like a good plan
Steve
- September 16, 2019 at 12:02 pm #81907sdel_nevoParticipant
Hi Guys
after updating to the latest versions this morning
shop staff
drivers
able to see all site media, this appears to be resolved 🙂affiliates
can still see all sites media 🙁vendors that have also got shop staff roll when using this code
//Calendar Sync For vendors - Add Staff Role add_action( 'wcfmmp_new_store_created', function( $member_id, $wcfmmp_settings ) { $member_user = new WP_User(absint($member_id)); $member_user->add_role('shop_staff'); update_user_meta( $member_id, '_wcfm_vendor', $member_id); }, 50, 2 );
still, get Sorry, you are not allowed to attach files to this post.” error when these roles try to add media to products, profile image etc
I haven’t tested but im guessing that vendors who have also become affiliates would have Sorry, you are not allowed to attach files to this post.” error when these roles try to add media issue as well, because the affiliate role gets this error when trying to add an image to there profile.
Steve
- September 16, 2019 at 9:00 pm #82000sdel_nevoParticipant
Hi guys
so to recap after more testing on my site after updating all plugins today to the latest versions
issues remaining
delivery boy
Shop Staff
vendors with (shop staff role)
have this issue “Sorry, you are not allowed to attach files to this post.” when trying to add images to posts, products profile imageaffiliates
can still see all sites media
and get Sorry, you are not allowed to attach files to this post.” when trying to add images profileissues fixed
shop staff
delivery boys
vendors with shop staff role
issue allowing them to see all site media, this appears to be resolved 🙂I’m guessing that vendors who also become affiliates will have issues with the images in the same way as vendors with shop staff role currently do
Steve
- September 17, 2019 at 6:48 pm #82137WCFM ForumMember
Hi,
Are you using any custom user role editor plugin for the site?
Thank You
- September 17, 2019 at 6:49 pm #82139sdel_nevoParticipant
Hi Guys
No, we are not editing user roles at all
we haven’t installed a role editor, were just using the roles the WCFM have created
Steve
- September 17, 2019 at 7:00 pm #82142sdel_nevoParticipantThis reply has been marked as private.
- September 18, 2019 at 12:23 pm #82274WCFM ForumMember
Hi,
Thanks for the access details.
affiliates
can still see all sites media– Right, as your affiliate was not updated. I have just update to the latest version, 1.2.0 and this issue resolved.
Sorry, you are not allowed to attach files to this post.
– This issue was causing by “WP Avatar” plugin.
I have added this code to your site and now it’s working perfectly –
add_filter('wpua_is_author_or_above', function( $is_author_or_above ) { global $wp_user_avatar, $wpua_is_profile, $current_user; if ( $wp_user_avatar && isset($current_user->roles) && is_array($current_user->roles) && array_intersect( array( 'wcfm_affiliate', 'wcfm_delivery', 'shop_staff' ), $current_user->roles ) ) { $wpua_is_profile = 0; $is_author_or_above = true; } return $is_author_or_above; }, 999 ); add_filter('media_view_settings', function( $setting ) { global $wp_user_avatar, $current_user; if ( $wp_user_avatar && isset($current_user->roles) && is_array($current_user->roles) && array_intersect( array( 'wcfm_affiliate', 'wcfm_delivery', 'shop_staff' ), $current_user->roles ) ) { remove_filter('media_view_settings', array($wp_user_avatar, 'wpua_media_view_settings'), 10, 1); } return $setting; }, 9, 1 );
We will add this code in WCFM core next update.
Thank You
- September 18, 2019 at 1:30 pm #82278sdel_nevoParticipant
Hi guys
That’s brilliant many thanks for the help
Steve
- September 18, 2019 at 5:29 pm #82301sdel_nevoParticipant
Hi Guys
where do I put the code above, in the functions.php file?
I have looked but can’t see where you entered this on my test site
it is working on the test site really well, many thanks
Steve
- September 18, 2019 at 5:53 pm #82306sdel_nevoParticipantThis reply has been marked as private.
- September 19, 2019 at 1:03 am #82340sdel_nevoParticipant
Hi Guys
I have just had a vendor sign up and assign a staff member, that staff member has access to all users media.
staff role appears to have the same issue as the affiliates did, they can see all users media
is there a snippet I could apply to stop this, or will this be addressed in an update t the groups and staff plugin?
Steve
- September 19, 2019 at 3:10 pm #82423sdel_nevoParticipantThis reply has been marked as private.
- September 19, 2019 at 6:47 pm #82505sdel_nevoParticipantThis reply has been marked as private.
- September 21, 2019 at 12:19 am #82706sdel_nevoParticipant
hi Guys
all sorted 🙂
I had an issue with wordfense
I disabled that plugin and it worked correctly, deleted and reinstalled
the system is working as expected 🙂
please close this ticket
many thanks for your help
Steve
- September 22, 2019 at 1:29 pm #82911WCFM ForumMember
Great … thanks for the update 🙂
- AuthorPosts
- The topic ‘issue with new vendors’ is closed to new replies.