Funny Looking Blog Name During Registration Process

I’m testing my Multisite install, and I’m creating a test user, and I want the test user to create a new blog during registration process. On the registration page, where it says Blog URL (required), it looks like this:

http://__________________________.http://solofirm.net

(where the underlined part is where the test user would put the site name)

It would be a whole lot better if it looked like this:

http://_____________________.solofirm.net

How do I fix this?

  • jimmybarr
    • Design Lord, Child of Thor

    Yes, I was testing with maintenance mode disabled. I re-enabled maintenance mode last night before I went to bed.

    I really need to get Prosites set up, too. Should probably work on that before worrying about the above issue. :disappointed:

  • Patrick
    • Support Monkey

    If you were getting that weird URL while testing on a live site (not locked out behind a maintenance mode plugin), we’ll need to get to the bottom of this first before tackling ProSites. Otherwise it will cause additional issues.

    If your subsites get URLs like this:

    http://_____________________http://.solofirm.net

    they will not work.

    Please double-check in “Network Admin” > “Settings” > “Network Setup” that the info you pasted to your wp-config.php file is exactly what is shown.

  • jimmybarr
    • Design Lord, Child of Thor

    The contents of wp-config.php look identical to the Network Setup code. Here’s what I’ve got in the wp-config:

    define('WP_DEBUG', false);

    define('WP_ALLOW_MULTISITE', true);

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'solofirm.net');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    /* That's all, stop editing! Happy blogging. */

    Is it possible that something in .htaccess is causing trouble? Except for child.css, .htaccess is the only other file I’ve edited (and I just copy-pasted what WP told me to copy-paste).

  • jimmybarr
    • Design Lord, Child of Thor

    If it makes any difference, the "Add New Site" screen shows the proper domain:

    .solofirm.net

    See screenshot.

    As far as I can tell, the funky domain name only appears on the user registration form. I'm running BuddyPress 1.6.1 and a couple of plugins that affect the registration process:

    WPMU's Signup TOS (Terms of Service) plugin v. 1.2.2

    BuddyPress Group-O-Matic v. 1.0.3

    BuddyPress Group-O-Matic Pro v. 1.0.2

  • jimmybarr
    • Design Lord, Child of Thor

    Just for fun, I completed the test user registration and, despite the unsightly Blog URL shown on the registration page, the test user was created successfully, and the test site was also created successfully.

    So. What file do I have to hack to get the Blog URL to display properly in the registration page?

  • jimmybarr
    • Design Lord, Child of Thor

    Patrick — I think it’s actually a problem in themes/studio/registration.php

    Look at lines 192-193 of that file:

    <?php if ( is_subdomain_install() ) : ?>
    http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php echo preg_replace( '|^https?://(?:www.)|', '', site_url() ) ?>

    It is echoing “http://”, which is proper. Then it displays the input box. Then it appears to be re-echoing the “http://” portion of the site URL. I don’t know what the preg_replace thing does, and I’m not fluent enough in PHP to make it stop re-echoing the “http://” part of the site URL.

    How do I fix this?

  • Patrick
    • Support Monkey

    Basically, the preg_replace is checking whether your site URL needs to be prefixed with https and/or www

    But, you’re right, it seems that it’s in the wrong spot for a sub-domain install. As your site does not require either https or www, I believe you can safely replace that snippet with this:

    <?php if ( is_subdomain_install() ) : ?>
    http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> . <?php echo site_url() ?>

    If you do try the above, remember to keep the original snippet handy just in case my idea blows up :slight_smile:

    I’ll alert the theme developer to this issue to see if he can provide additional insight.

  • jimmybarr
    • Design Lord, Child of Thor

    It didn’t fix the problem. The problem is that the variable site_url() includes the “http://” portion of the URL.

    I just told register.php to print my domain name without using any variables. That fixed it but it doesn’t seem very tech-y.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.