PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

User Registration -- created site URL is broken

  1. I believe I've run into the same issue described in this earlier forum topic:

    http://www.gravityhelp.com/forums/topic/user-registration-site-creation-name

    Same situation -- multisite, this plugin, and created sites that have a slash in the wrong place and are broken.

    In that post there was mention of a beta version of the plugin that might fix the problem. Would that be something I can test out to see if it fixes the issue?

    Posted 10 years ago on Sunday April 28, 2013 | Permalink
  2. I did some debugging/testing of my own and think I may have found a temporary fix. Keep in mind this might only work in my specific situation, and even then only for the moment. But I'm posting it here just in case someone stumbles in with the same issue and is looking for a quick fix.

    In the User Registration plugin, in the userregistration.php file on line 2014, you have the function that actually creates the blog. I just modified it from what it was to this:

    $blog_id = wpmu_create_blog($site_data['domain'], '/' . $site_data['path'], $site_data['title'], $user_id , array( 'public' => 1 ), $current_site->id);

    My addition was only five characters, four if you don't count spaces :). Basically I added the '/' before $site_data['path']. And at least for now, that seems to have solved it for me. If I have more time I'll dig further in and try to find out why the plugin isn't providing that slash when it should be, but for now I'm just happy it's temporarily working.

    Posted 10 years ago on Sunday April 28, 2013 | Permalink
  3. Thanks Ryan. I will send this information to the developer of the User Registration add-on.

    Posted 10 years ago on Friday May 3, 2013 | Permalink
  4. This seems to be a configuration issue. The path should already start with a forward slash. Take a look at the PATH_CURRENT_SITE constant in your wp-config.php.

    This is how our test site is configured:
    define( 'PATH_CURRENT_SITE', '/wpmulti/' );

    Posted 10 years ago on Tuesday May 7, 2013 | Permalink
  5. You're both right. The problem is not in how it creates the site but how the site is registered in the sites area in the network admin. It needs a leading forward slash there as well but it is missing. Ryan's fix is on the money. Seems you could also bring the slash in through the $site_data array but either way seems to work. The array could potentially break something else though, not too sure on that.

    Thanks,
    Kiko

    Posted 10 years ago on Friday May 10, 2013 | Permalink