• Resolved llocally

    (@llocally)


    Hi,

    When you activate Join My Multi site it has to be network activated. By default the setting per sub site is is ‘None’ you have to add them manually.
    https://i42.tinypic.com/2utqky9.jpg

    The plugin works fine for the option ‘Manual’ and the shortcode as far as I can see.

    But ‘None’ you have to add them manually, when as super admin I add a new administrator it doesn’t appear on the sub site user list and has ‘insufficient’ permissions.

    The user list actually counts 2 users, but only 1 is shown

    https://i41.tinypic.com/2gxo203.jpg

    If I disable the plugin, and add users manually they add in the expected way with expected permissions.

    It is a great plugin, but if as super admin I can’t effectively add new admins its an issue.

    https://www.ads-software.com/plugins/join-my-multisite/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    This is because you picked ‘none’ for the default role. People have to have a role to get in, so make that Subscriber and see what happens.

    I’ll document that better and come up with an error to point out that you MUST have a role. Having ‘none’ is possibly conflicting with other things.

    By the way, why would have no user role and still want people to join the site? What were you expecting to happen in that scenario?

    Thread Starter llocally

    (@llocally)

    That explains it. Although far from intuitive. If you set none – manual – when you manually add you get a role option so one would assume the role selected at add user applies. Infact it takes the plugin role, which then requires a second edit to set the desired role.

    I actually only want external enrolement on a couple of subzites, but as plugin activates on all.

    Excuze typos posting from phone

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yeah, I’m going to change that so the plugin doesn’t run if you have -none- because logically “Well you added someone with NO role via the plugin.”

    Though it shouldn’t impact manually adding people from the back end at all! How are you adding them? /site/wp-admin/users.php or /wp-admin/network…?

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Huh…. Okay the DEFAULT is ‘Subscriber’ so you changed that to none on purpose. I’ll make an alert to point out why this is bad.

    Thread Starter llocally

    (@llocally)

    Well, I don’t think the issue is with your plugin, but with perhaps some other plugin in my multi-site.

    I managed to get it working, i.e. manual add by superuser not creating a user with no rights, and now I can’t get it to ‘break ‘ again.

    I’m going to have to try out a few options on on a different build and see if I can recreate the issue.

    For me the default was definitely ‘none’ . I’ll report back, but as I said I don’t think it is you, it is probably something else. Finding out what may take some time.

    Thread Starter llocally

    (@llocally)

    I just installed it on a multi-site that it has never been on (3.7.1) and the default is definitely -none- for me

    https://i42.tinypic.com/2rw6yp5.png

    Thread Starter llocally

    (@llocally)

    OK on a multi-site with NO other plugins I get sensible defaults

    https://i44.tinypic.com/nei4oj.png

    now the process to eliminate 50 plugins ugh!

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I”m removing ‘None’ as an option, since it’s a useless idea ?? So that should help a little!

    Thread Starter llocally

    (@llocally)

    OK, it is your code that isn’t setting the default correctly.

    Line 121 of settings.php uses an option default_user_role that isn’t defined prior, so will come up with -none-

    <?php wp_dropdown_roles( get_option( 'default_user_role' ) ); ?>

    (wordpress does have an option default_role but that is different)

    If this were set, in defines.php say after lines 30-37

    if (!get_option( 'helfjmm_options' )) {
        $jmm_options = get_option( 'helfjmm_options' );
            if ( !isset($jmm_options['type']) ) $jmm_options['type'] = '3';
            if ( !isset($jmm_options['role']) ) $jmm_options['role'] = 'subscriber';
            if ( !isset($jmm_options['persite']) ) $jmm_options['persite'] = '0';
            if ( !isset($jmm_options['perpage']) ) $jmm_options['perpage'] = 'XXXXXX'; // blank
        update_option('helfjmm_options', $jmm_options);
    }

    with

    if (!get_option( 'helfjmm_options' )) {
        $jmm_options = get_option( 'helfjmm_options' );
            if ( !isset($jmm_options['type']) ) $jmm_options['type'] = '3';
            if ( !isset($jmm_options['role']) ) $jmm_options['role'] = 'subscriber';
            if ( !isset($jmm_options['persite']) ) $jmm_options['persite'] = '0';
            if ( !isset($jmm_options['perpage']) ) $jmm_options['perpage'] = 'XXXXXX'; // blank
        update_option('helfjmm_options', $jmm_options);
    }
    if (!get_option( 'default_user_role' )) {
         update_option('default_user_role', 'subscriber');
    }

    [ Although it may have been your intention to actually use ‘default_role’ rather than ‘default_user_role’ but I haven’t looked into that ]

    I think that the missing ‘default_user_role’ explains my ‘irrational response’ because when it was missing nothing works, but of course doing an update creates it and fixes the problem. I’m of course assuming ‘default_user_role’ is pivotal to the main code (which I haven’t looked at, just the admin settings).

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    default_user_role() is an ‘old’ WMPU function….

    Though it should have been called like this:
    <?php wp_dropdown_roles( get_site_option( 'default_user_role' ) ); ?>

    Bad me. I wonder if your other plugins were changing the userroles on a different site and that’s why it’s borking. Also it looks like that was …. vanished. GUH.

    Okay then!

    <?php wp_dropdown_roles( get_site_option( 'default_role' ) ); ?> would be a simplier fix, neh? I’m testing it locally, but if that (also) works for you, then I’m going to call that a turkey and baste it.

    Er… Sorry.

    Thread Starter llocally

    (@llocally)

    I’m sure you’ll hav eit covered, but don’t forget to change the update_option(‘default… on line 36 too

    and in other places where that option is used like shortcode.php, if you go down the route of changing the option name.

    Anyway glad to have been able to help.

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    DOH. I’m giving you a shoutout in this update, friend!

    grep default_user_role….

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Not working for manual’ is closed to new replies.