Join My Multisite
[resolved] Problems and workarounds using v. 1.1 on wordpress 3.4.2 (5 posts)

  1. dokkaebi
    Posted 2 years ago #

    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'); }
    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);
    $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']); }
            {$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.


  2. I'll have a look! Likely ill pull these into the plugin of dthe next guy :) thank you!

  3. 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? :)

  4. dokkaebi
    Posted 2 years ago #

    Cool! I contributed something. :)

    Here it is:

    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.


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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Join My Multisite
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic