Skip to:

Opened 13 years ago

Closed 13 years ago

#3103 closed defect (bug) (fixed)

New blog creation in default theme – Blog URL suffix text incorrect for subdomain installation

Reported by: bigtweet's profile bigtweet Owned by:
Milestone: 1.5 Priority: minor
Severity: Version: 1.2.8
Component: Blogs Keywords: blog creation, default theme, root blog, subdomain
Cc: scarter28m-temp@…


WordPress 3.1, BuddyPress 1.2.8

In the BuddyPress default theme, the form text associated with a new blog creation is incorrect for a subdomain installation when the root blog is changed. This problem exists both in the new user sign-up form as well as the form for creating a new blog.

As an example, if the root blog is the suffix text on both forms should end in:
http://[form input]

Instead what appears is:
http://[form input]

Details on network setup
I have changed my root blog to be with edits to wp-config.php using references I've found on various sites.

The following assumes that the blog id of is 1 and that of is 3:

define ( 'BP_ROOT_BLOG', 3 );

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
$base = '/';

Occurences of bug
On line 184 in:

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

On line 379 in:

echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /> <span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';

Proposed fix
I have fixed this by changing site_url() with get_site_url(1) in first occurence mentioned above.

In the second occurence, I also used get_site_url(1) in my fix:

echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /> <span class="suffix_address">.' . str_replace( 'http://', , get_site_url(1) ) . '</span><br />';

This works as long as the blog id of the initial network domain never changes from the default of 1.

Is there a better way to get the root network domain?



Change History (3)

#1 @DJPaul
13 years ago

  • Component changed from Theme to Blogs
  • Milestone changed from Awaiting Review to 1.3
  • Priority changed from normal to minor

#2 @boonebgorges
13 years ago

Possibly related: #3227. Needs testing against latest trunk after r4389

#3 @DJPaul
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r4389

Note: See TracTickets for help on using tickets.