issue with new vendors

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 31 reply threads
  • Author
    Posts
    • #80633
      sdel_nevo
      Participant

      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

    • #80635
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #80720
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #80724
      sdel_nevo
      Participant

      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 me

      Steve

    • #80726
      sdel_nevo
      Participant

      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

    • #80733
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #80778
      WCFM Forum
      Keymaster

      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

    • #80788
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #80839
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #80915
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #80958
      sdel_nevo
      Participant

      Hi guys

      The forum says you replied, but noth8ngs showing here

      Steve

    • #81193
      sdel_nevo
      Participant

      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

    • #81344
      sdel_nevo
      Participant

      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

    • #81474
      sdel_nevo
      Participant

      Hi Guys

      i have replied to your email you sent me via the priority support link at 06:44 this morning

      steve

    • #81630
      WCFM Forum
      Keymaster

      Hi,

      staff members
      delivery drivers
      affililiates

      all 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

    • #81631
      sdel_nevo
      Participant

      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

    • #81723
      WCFM Forum
      Keymaster

      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

    • #81740
      sdel_nevo
      Participant

      Hi guys

      That sounds like a good plan

      Steve

    • #81907
      sdel_nevo
      Participant

      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

    • #82000
      sdel_nevo
      Participant

      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 image

      affiliates
      can still see all sites media
      and get Sorry, you are not allowed to attach files to this post.” when trying to add images profile

      issues 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

    • #82137
      WCFM Forum
      Keymaster

      Hi,

      Are you using any custom user role editor plugin for the site?

      Thank You

    • #82139
      sdel_nevo
      Participant

      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

    • #82142
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #82274
      WCFM Forum
      Keymaster

      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

    • #82278
      sdel_nevo
      Participant

      Hi guys

      That’s brilliant many thanks for the help

      Steve

    • #82301
      sdel_nevo
      Participant

      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

    • #82306
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #82340
      sdel_nevo
      Participant

      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

    • #82423
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #82505
      sdel_nevo
      Participant
      This reply has been marked as private.
    • #82706
      sdel_nevo
      Participant

      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

    • #82911
      WCFM Forum
      Keymaster

      Great … thanks for the update 🙂

Viewing 31 reply threads
  • The topic ‘issue with new vendors’ is closed to new replies.