WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] User signup w/blog has extra http:// before domain (10 posts)

  1. AMEEKER
    Member
    Posted 2 years ago #

    I'm setting up a Multisite with BuddyPress, using subdomain installs, also using s2member for membership levels.

    I will also ask this question in the s2member forums in case it's an issue with the plugin more than the install itself.

    Here's a screenshot of what I see when I start to register as a new user, and choose the option to also get a blog:
    yfrog.com/hwobvp

    It looks like http:// _______________ .http://yourcrimesite.com

    Why is there an extra .http// ?

    I have child sites on this installation
    metrocrimestoppers.org or metromaryland.yourcrimesite.com
    and they're working, so I don't think that a new site would be created using that incorrect domain... but I would like to know why it shows like that.

  2. Most likely a plugin issue. When did this start happening?

  3. AMEEKER
    Member
    Posted 2 years ago #

    I've never noticed it because I've never registered someone that way. I'm now to the point where I'm testing the open registrations and so I'm seeing that for the first time. I've only created sites through the backend - using @andrea_r's wp_replicator and domain mapping (which have worked perfectly).

    Looking at it from the backend, if I am starting to replicate a site, it shows the subdomain properly with a ____________.yourcrimesite.com in the new address field, and does create the site correctly (not using http:// _______________.http://yourcrimesite.com as the domain).

    When I go ahead and register as a user and create a site from the front end, ignoring the http:// _______________.http://yourcrimesite.com, it does create the site correctly and with the proper domain.

    It seems like it's a printing error, but I don't know where to catch it.

    It makes me wonder if it's just a printing error.

  4. I would guess that if you manually created foobar.yourcrimesite.com you'd see the same thing, but to rule out Replicator, you should try that.

    That said, the sites are being created just fine so ... did you happen to customize that signup page?

  5. AMEEKER
    Member
    Posted 2 years ago #

    This is what's in the registrations/register.php file around the area of blog creation details:

    <?php /***** Blog Creation Details ******/ ?>
    
    					<div class="register-section" id="blog-details-section">
    
    						<h4><?php _e( 'Blog Details', 'buddypress' ) ?></h4>
    
    						<p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ) ?></p>
    
    						<div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
    
    							<label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
    							<?php do_action( 'bp_signup_blog_url_errors' ) ?>
    
    							<?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() ) ?>
    							<?php else : ?>
    								<?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
    							<?php endif; ?>
    
    							<label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
    							<?php do_action( 'bp_signup_blog_title_errors' ) ?>
    							<input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value() ?>" />
    
    							<span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ) ?>:</span>
    							<?php do_action( 'bp_signup_blog_privacy_errors' ) ?>
    
    							<label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes', 'buddypress' ) ?></label>
    							<label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No', 'buddypress' ) ?></label>
    
    						</div>
    
    					</div><!-- #blog-details-section -->

    I know the error must be in here somewhere, but I'm not sure exactly what to take out:

    <?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() ) ?>

    I definitely didn't alter THAT myself! haha...

  6. AMEEKER
    Member
    Posted 2 years ago #

    Ugh. Is there a better way to paste that in?

  7. <?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() ) ?>
    <?php else : ?>

    I think that's it....

  8. AMEEKER
    Member
    Posted 2 years ago #

    Sorry, I guess i didn't write that well enough above. I figured that it's in that same chunk of code you referenced in the last post, but I don't know what to change within it.

    Narrowing it down even further, I THINK it's something here:
    <?php echo preg_replace( '|^https?://(?:www\.)|', '', site_url() ) ?>

    Do I take out the ^https?://?

  9. AMEEKER
    Member
    Posted 2 years ago #

    No, that didn't work.

  10. AMEEKER
    Member
    Posted 2 years ago #

    Got it.

    Removed (?:www\.) from that line of code above.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic