• Resolved dokkaebi

    (@dokkaebi)


    problem 1
    I received the following warning after installing the plugin on wordpress 3.4.2 running the v. 1.6 of the skeleton theme:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘jmm_joinsite’ not found or invalid function name in /f5/kma/public/wp-includes/plugin.php on line 403

    I found a workaround by changing the following line in admin/defines.php from:
    if ($jmm_options['type'] == 1) { add_action('init', 'jmm_joinsite'); }
    to:
    if ($jmm_options['type'] == 1) { add_action('init', array('JMM','join_site')); }

    problem 2
    I got the following errors when trying to make a new signup page with the shortcode:

    Notice: Undefined variable: blog_id in /f5/kma/public/wp-content/plugins/join-my-multisite/lib/signuppage.php on line 90

    Notice: Trying to get property of non-object in /f5/kma/public/wp-content/plugins/join-my-multisite/lib/signuppage.php on line 94

    I fixed this by changing line 90 on lib/signuppage.php from:
    $blog_details = get_blog_details($blog_id);
    to:
    $blog_details = get_blog_details($current_site->blog_id);

    problem 3
    I could now make a signup page and it loaded correctly but I was getting an undefined $goto variable error. I found a workaround by moving the section of code near the beginning of signuppage.php that sets $goto and putting in the signup_user function.

    function signup_user($user_name = '', $user_email = '', $errors = '') {
            global $current_site, $active_signup;
    
    $jmm_options = get_option( 'helfjmm_options' );
        if ( !is_null($jmm_options['perpage']) && $jmm_options['perpage'] != "XXXXXX"  )
            {$goto = get_permalink($jmm_options['perpage']); }
        else
            {$goto = '/wp-signup.php';}
    ...

    These are just workarounds I found by following the error messages. I am not that familiar with php or the wordpress codebase, so this was simply my attempt to get things working. It is not meant to be pretty, but maybe it could be of help to someone else.

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

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

    (@ipstenu)

    ?????? Advisor and Activist

    I’ll have a look! Likely ill pull these into the plugin of dthe next guy ?? thank you!

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The first two issues are the right fix, thank you, I’ll have them in the next release.

    As for the third, I’m not sure what you moved. Can you copy your whole signuppage.php to pastebin.com and link to it here so I can run a diff? ??

    Thread Starter dokkaebi

    (@dokkaebi)

    Cool! I contributed something. ??

    Here it is:
    https://pastebin.com/74hwS1RD

    The code near the beginning of the file that set $goto sets $goto correctly, but the function signup_user can’t read it. I guess it’s a scope issue, but I don’t know what php scope rules are. So I just copied and pasted the code that sets $goto into the function.

    Cheers!
    Sungwon

    Plugin Author Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Alright, all these will be fixed in the next version. Whew. Very busy week for me at work ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems and workarounds using v. 1.1 on wordpress 3.4.2’ is closed to new replies.