Membership plugin settings issues

Hi there,

I am having major issues setting up the membership plugin on a new install. The site is on the server but the domain is not delegated.

1. I have set up the subscription plans and each is set to its membership level. However when I test a subscription they all are set to the basic subscriber level. The only way to fix this is to manually go into the user settings and edit them to the correct or initial subscribed level.

2. Access levels - I have tried the Positive and negative setup with the same results of partial success. To start with the administration levels I select what I want them to have access to in the admin menu. First off the main menus which didn't work. Then I tried adding the sub menus and still this didn't work. eg. using the branding plugin I don't want any level to see that so in both menus and sub menus I make sure its not visible but when I save the settings and look again all the boxes selected un-select. Either way Pos or Neg its visible to all member levels? Some things hide or work but most don't?

3. To get more fine grain control I tried using Admin Menu Editor Pro + User Role Editor from Janis Elsts, which work on their own but look to conflict with the membership plugin.

I hope there are some solutions to the issues? Also is there a way to clean out all the settings form these three plugins so I can start again as I think all the setting are mixed up now?

Regards

Peter

  • Michael Bissett

    Hey @Peter, hope you're doing well today. :slight_smile:

    You should be able to clear the settings out for all three plugins by uninstalling them, as that information gets deleted on uninstallation.

    Have you tried disabling everything else aside from Membership, to see if that makes a difference?

    If things are still not working correctly after you uninstall & reinstall Membership (don't install the other two yet), and you try having only it enabled on your site, could you enable Support Access, so I could have a closer look at your setup?

    Thanks! :slight_smile:

    Regards,
    Michael

  • Peter

    Hi Michael,

    I have started testing ... not good! I have added a sequential set of screen shots.

    1. Deleting the plugins does not delete the settings. The first two screen shots show the old settings under users with the plugins deleted.

    2. I did not import the other two but reinstalled and activated the Membership Plugin. All the original settings were there. I updated all the settings so they match and keep things clear. Deleted the duplicate registration pages and made sure everything matched.

    3. Under user roles the updated user names/roles did not update? On the live site they all do match.

    4. Registration of a new user to a selected level works and reflects correctly with the welcome page however they are assigned only as a subscriber under Users which is not good.

    5. Setting admin restrictions is as above. Hit and miss with some working and many not. Also not all plugins that have menu functions dont even show in the options to access or not access?

    Hope you can help

    Regards

    Peter

  • Ash

    Hi @Peter

    Would you please grant support access from your Dashboard > WPMU DEV > Support > Support Access so that I can check?

    Alternatively, send me login details.

    To send me details, please use our contact form: https://premium.wpmudev.org/contact/

    Select: I have a different question
    Subject: Attn-Ash
    Details: Send all required details (admin info and/or ftp details) with a link of this thread, so that I can track.
    Also post a note here once you send the info.

    I will be happy to take a look :slight_smile:

    Cheers
    Ash

  • Ash

    Hi @Peter

    I have set some basic adjustment in your membership settings, and checked with an account. It was registered under School Sport Convenors plan. I have also set some negative rules for that level - a page and two menus, so I don't have access with those pages and menus.

    Please note that, there was a conflict with a plugin, I didn't find which one. But first I am requesting you to go with only membership plugin. (this is the only plugin activated right now besides DEV DASHBOARD plugin). Also, make sure you have enabled a gateway. I have used paypal gateway in sandbox mode (my sandbox email is still in your settings, you can use your own or use mine for now) to test.

    Please give it a run, and try to find out the issues. Once we are all set, we will activate plugins one by one and try to find out which one is culprit in this case :slight_smile:

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Peter

    Hi @Ashok

    Thank you I will go through the settings. One thing I found was that by simply switching off plugins does not mean the settings from those plugins is inactive or in some way still effecting a setup. Membership is one of those which still leaves membership levels behind. So this may not be as simple as taking plugins on or off!

    2. All the membership sites I have set up so far have been for no payments. Is it not possible to have a simple setting that allows no payment?

    3. Positive rules has never really worked and strong warnings for positive & Negative together so why not simple deactivate them?

    Ill let you know what I find.

    Regards

    Peter

  • Peter

    Hi @Ashok

    Failed at the first round. I now have limited access.

    I set negative rules for the ISA Administrator to limit some of the menu items in the admin but now this level and all other levels only show 2 admin menu items with no access to anything which I had set for one of the lower levels ie. The minimum setting I set for a lower level member is now the base for all member levels.

    This results in no access for me at all. I also tried setting up a new account but this gave me even less access.

    Can you please reset and see what is happening as member levels even when set from 1 to 5 are not being respected?

    Regards

    Peter

  • Michael Bissett

    Hey @Peter,

    I'm not able to access your site via the Support Access you granted previously, "localhost" keeps showing up as the address, so I can't get in that way.

    However, there is a way to reset the settings for the membership levels. But, this would require me to go into your cPanel, as some adjustments need to be made to the database.

    Could you send over cPanel login details, as well as WP admin details for the sub-site you set up, to contact(at)wpmudev.org (with the subject line Attn: Michael Bissett)?

    Please include a link to this thread in your message. Thanks a bunch! :slight_smile:

    Regards,
    Michael

    P.S. Could you give an example of a rule you're trying to set up in Membership? I'm curious to see if part of the problem we're running into here is the the rule being set up for the content.

  • Jack Kitterhing

    Hi there @Peter,

    Hope you're well today! :slight_smile:

    I've tried to take a look at this for you, but your cPanel, isn't loading any styling and nothing works, such as trying to load the file manager, or phpmyadmin.

    After checking in the console, I'm getting a 401 permission denied on everything there, are you having any issues with this? :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Peter

    Hi Jack,

    The sit and test site sub domain are working. This is the method this provider uses for accessing sites before domain delegation.

    In the host file try this for the IP settings:

    182.160.156.20 http://www.members.isa.nsw.edu.au
    182.160.156.20 members.isa.nsw.edu.au

    I notice when I save the www ads the http:// so remove that in the host file!

    This covers all options. Also try a couple of different browsers as sometimes chrome turns it into a search query?

    The client wants to go live in the next couple of weeks so hopefully we can get this all sorted by then?

    Regards

    Peter

  • Michael Bissett

    Hey @Peter, hope you're doing well today. :slight_smile:

    I found that I had to use a different link in order to get to the cPanel for your site, the one you sent over kept logging me out when I tried to navigate to any of the configuration pages.

    I've notified my colleague @Jack Kitterhing of this, so that he can continue his investigation of the matter.

    Thanks for your patience here, it's definitely appreciated!

    Regards,
    Michael

  • Jack Kitterhing

    Hi there Peter,

    I'm in now :slight_smile:

    I've been through every setting and there/were a couple of issues.

    Access levels, you have some with positive rule sets and some with negative rule sets, now with the plugin, you must use one or the other, rather than mixing them across levels.

    We're working on 4.0 and that would be more focused to the positive side of things, which is what I'd recommend using. :slight_smile:

    Also some access levels had no rules, all access levels must have one rule at least for this to work correctly.

    Then you had a default subscription assigned, with Membership you can only have one subscription per user, which was overriding the subscription, I've removed that and left it to just the visitor access.

    Once you've setup the access levels this should all work correctly.

    Thank you!

    Kind Regards
    Jack.

  • Peter

    Hi Jack,

    Thanks for the updates.

    1. I activated all the plugins I need for the site. Membership needs to work with them!

    2. I went through and made all positive rules for what I want each member level to access. All settings saved correctly with no errors.

    3. I logged out and added a new mid level member which was OK until I looked at what they had access to which was everything I didn't want them to access and an odd collection of rules applied

    4. I then logged back in as the admin and under users "PGeddes1a" Is meant to be a "Head of Sport" but shows as a subscriber? Under membership levels he is a "Super User" set at this level its not possible to move the member level up or down which makes user control un-manageable?

    All subscription plans are set correctly but not setting the applying member to that level but rather at the wordpress default of subscriber?

    On a side note in the admin bar at the top all users can switch between user views? This should not show at all!!

    5. Adding to this I went and made the same changes to the main site and as soon as I added all the positive rules I was treated as the main admin the same as my top level member which knocked out heaps of menu items. Fortunately I was able to still access the members plugin so I could deactivate that level and get my functions back but it also means that user has full access as well? Real mess!!

    6. I went back into the users of the main site an on the right I could see a list of all the member privileges so edited those to remove them from my main admin so I could then re-activate the top level role but as soon as I saved that all membership level options went and the admin for members went. I tried deactivating then reactivating but still gone. Went in as the client access and can see it there so how do I restore and fix this for the master admin?

    So as you can see this is still all over the place.

    Can you please advise.

    Regards

    Peter

  • Michael Bissett

    Hey @Peter,

    I agree, this is all over the place.

    After doing some further investigation, the root problem seems to be how the user roles are set up (they're basically admins on the site, which causes more than one problem).

    At this point, what I'd like to ask is, with each of these access levels:

    - ISA Administrators
    - Heads of School
    - Heads of Sport
    - School Sport Convenors

    Just what is it that each user in these access levels should be able to do? Are any of them needing to manage settings, do they need to manage the Membership plugin at all?

    The more details you can provide on what features they should be allowed to use, the better, as these user roles are presently getting in the way of getting this site set up correctly. Once that's dealt with, we can proceed from there.

    Please advise,
    Michael

  • Peter

    Hi Michael,

    The Website is for a sporting organisation that runs inter school sporting competitions for 20 schools and 12 different main sports.

    There are 4 main functions of the site. 1. to promote the organisation 2. list and manage all the upcoming events and 3. display results from each of the games and the 3 main carnivals they hold each year. 4. manage documentation that is required to deliver some of the results and supporting documentation, reports and meetings for each of the three main admin groups.

    There are no fees or individual student enrolments like on traditional sports management systems - This could be part of the issue!

    So we have these levels.

    1. ISA Administrators of office staff that will have the most access to edit and add content in all areas but not have access to settings, plugins and themes although eventually this may open up.

    2. ISA Heads of School - They will have less access but will see everything from this level down. This is for documentation and policies they are responsible for in running the organisation through their administrators. Roughly 20 members

    3. ISA Heads of Sport. Each school hosts rounds of these sports at their facilities and as such make sure their rounds are rostered and that they have coaches, referees and staff set in place so they are responsible for adding their 80 - 160 events per week so they manage the Events details, Results, and relevant documentation. Roughly 20 members.

    4. School Sports Convenors. These are the volunteers and sports coaches of the individual sports that we are looking to mange their particular sports ie. documents results input and articles for games notes etc.

    At the moment I am trying to keep their relevant documentation on their individual protected pages and thats it. The rest is similar access to the admin for Events and Sports results.

    The aim is for them to register and immediately have access to their areas of responsibility and no more. Once I have all the heads of School and heads of Sport signed up I was going to hide those registration modules so only Sport Convenors is left open for registration. This would leave it as the access point for logging in.

    One of the main issues I have found is that setting either Positive or Negative Roles and then trying to protect admin areas does not work at all which is why I use the role manager which does and excellent job. I have read on other threads that it does not conflict with the Membership plugin although I suspect it doesnt help in identifying the issues we have here.

    Also not sure where Supper Admin is coming from and why that is the default for anyone subscribing?

    As a safety it would be great if the Members plugin had a sidebar setting option on each page or post that would allow you to assign a membership level the same as S2members. This would allow page settings, member settings or shortcode settings for maximum protection and flexibility. It would also make it easier if there were only one or two options Pos or Neg?

    Please let me know if you need any more information.

    Regards

    Peter

  • Ash

    Hello Peter

    Would you please let us know the main issue and how we can test?

    I mean, show us an example, like Level A should not have access that link, but he can access - something like that. So that we can focus on the main issue, it will be very helpful.

    About your custom role and membership plan, I have just registered from front end with another username ashtest2, and I got the Heads of Sport role as it should. I am not assigned as super admin and no membership admin settings access are applied for me.

    Please suggest.

    Cheers
    Ash

  • Peter

    Hi Ashok,

    Congratulations you are the first that has registered to the correct level!

    Heads of sport can access its level and sport convenors level under the "members" navigation. They can access Posts and Events in the admin.

    If you have a look at the positive roles set that will show you exactly.

    Would it be better if you had a copy of the database? It may be better to wipe the roles and those registered to be members and start again?

    Regards

    Peter

  • Jack Kitterhing

    Hi there @Peter,

    Hope you're well today. :slight_smile:

    I've done some further testing here, all my test users were successfully added to the subscription and the content was correctly protected/accessible based on the rules set.

    The issue now is with the admin bar, the view site as. This is because all your users have the manage_options capability, this should only be given to admin of the site that needs to make changes, add plugins etc.

    The Membership plugin uses manage_options like most other plugins to check the capabilities if the user can or can't access something, for instance view site as code from membership > classes > Membership > module > Adminbar.php from line 94

    /**
    	 * Sets what menu to add to the admin bar.
    	 *
    	 * @since 3.5
    	 * @action add_admin_bar_menus
    	 *
    	 * @access public
    	 */
    	public function add_admin_bar_items() {
    		if ( !is_user_logged_in() ) {
    			return;
    		}
    
    		$user = wp_get_current_user();
    
    		if ( $user->has_cap('membershipadmin') || $user->has_cap('manage_options') || is_super_admin($user->ID) ) {
    			$method = Membership_Plugin::is_enabled()
    				? 'add_view_site_as_menu'
    				: 'add_enabled_protection_menu';
    
    			add_action( 'admin_bar_menu', array( $this, $method ), 8 );
    		}
    	}
    
    	/**
    	 * Adds "View Site As" menu to admin bar.
    	 *
    	 * @since 3.5
    	 * @action admin_bar_menu
    	 *
    	 * @access public
    	 * @param WP_Admin_Bar $wp_admin_bar Admin bar object.
    	 */
    	public function add_view_site_as_menu( WP_Admin_Bar $wp_admin_bar ) {
    		global $wpdb;
    
    		$admin_url_func = Membership_Plugin::is_global_tables()
    			? 'network_admin_url'
    			: 'admin_url';
    
    		$title = __( 'View site as: ', 'membership' );
    		if ( empty( $_COOKIE['membershipuselevel'] ) || $_COOKIE['membershipuselevel'] == '0' ) {
    			$title .= __( 'Membership Admin', 'membership' );
    		} else {
    			$level_id = (int)$_COOKIE['membershipuselevel'];
    			$level = Membership_Plugin::factory()->get_level( $level_id );
    			$title .= $level->level_title();
    		}

    Removing manage_options from your custom user roles, should resolve all outstanding issues with this.

    Thanks!

    Kind Regards
    Jack

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.