BuddyPress Create a site assigns an invalid URL

I have posted a question on BuddyPress too, but hopefully someone here might have the answer:

’m running a subdirectory-based multisite setup using W3.9.1 and BuddyPress 2.0.1

Going into the dialogue, it shows: Sitename, followed by the URL of the multisite setup ibstherapists.co.uk/ and then the input field, so I enter ‘test’ expecting to access the site as ibstherapists.co.uk/test

However, once the create a site is completed, the actual URL displayed is http:///test/ – no sign of the ibstherapists.co.uk and of course the url is invalid.

I’m new to Buddypress, so it is quite possible I’ve missed something (although I couldn’t find anything!). Could someone please give me some pointers in the right direction?

  • Johanna
    • The Incredible Code Injector

    htaccess

    php_flag display_errors off
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    php_value upload_max_filesize 32m
    php_value post_max_size 32M
    php_value max_execution_time 300
    php_value max_input_time 300
    php_value memory_limit 196M

  • Johanna
    • The Incredible Code Injector

    wp-config

    /** The name of the database for WordPress */
    define('DB_NAME', 'ibsdb');

    /** MySQL database username */
    define('DB_USER', 'xxxxx');

    /** MySQL database password */
    define('DB_PASSWORD', 'xxxxx');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define('AUTH_KEY', '{|-ASej1X~e@o4eK7FEP-g+&+^SY%k,[CcYCA.KN[,JEY|$SirQD&Y!jtmfBvr9L');
    define('SECURE_AUTH_KEY', '}1[dlpje)cTgU6ge08c;ov7F4yS8F`t~9G, 9rW2.s8wEL?zl&^Hy[j-20)k1RW+');
    define('LOGGED_IN_KEY', '(-qwh|M7]y`Nf+Nkitm-o2|5!:msz[@HRTl65hHnBA]Sf%GQ}i9C:K<j3!;Ef[cM');
    define('NONCE_KEY', 'JbC;|}&:wink:h-NMX39 bo|z:V@T5c9_=+{tVPe=-qYjcoND~H+,yqlgAG.[a7,O/tSV');
    define('AUTH_SALT', '@mAsEt2>CJAi=w2P5-:3M+Tvq^&&|NQo>nwoc|a|H&j,c|J{$!|,?B;@ah*vnwmL');
    define('SECURE_AUTH_SALT', 'mgLP:W^57d~7]7dtxo!xxPkV>zH!P:2~Oqd/3!0aI:}gNM|**os8l04h2B7UYIwM');
    define('LOGGED_IN_SALT', ' ov`DMMJ?.5J 1XkE=?j6DC6x/)SQHJQ@ (|s}S|XR;Z&&&$}AIu=2S$UecfAvya');
    define('NONCE_SALT', 'f5/-Lu+@+6t2UxHjkEkNN(Yf3+CYz6OZU0Wlba+F5Ogjz0*3Gu*baJ>gA24z6S');

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = 'wp_';

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
    * language support.
    */
    define('WPLANG', '');

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */
    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'ibstherapists.co.uk');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('DOMAINMAPPING_ALLOWMULTI', true);
    @ini_set('display_errors', 0);

    /* ftp settings */
    define('FTP_USER', 'xxxxx');
    define('FTP_PASS', 'xxxxxx');
    define('FTP_HOST', 'xxxxxx');

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

    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

    /** Sets up WordPress vars and included files. */
    define('SUNRISE', 'on');
    require_once(ABSPATH . 'wp-settings.php');

  • Vaughan
    • Support/SLS MockingJay

    Hi @Johanna,

    Can you move the following line in wp-config.php

    define('SUNRISE', 'on');

    Make sure it is above the line that reads

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

    Is this a new site? or have you had it a few years and updated it over time?

    Thanks

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    f you created the site at end of 2013, Do you know what version you first installed? if it was after version 3.5 then your htaccess is incorrect.

    If you used version 3.5 or newer when you first installed, can you try the following in your htaccess

    php_flag display_errors off
    php_value upload_max_filesize 32m
    php_value post_max_size 32M
    php_value max_execution_time 300
    php_value max_input_time 300
    php_value memory_limit 196M
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Hopefully that should fix it.

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    Ok, let's start some debugging.

    Can you remove the following line from wp-config.php

    define('DOMAINMAPPING_ALLOWMULTI', true);

    Then disable any domain mapping plugins, such as domain mapping & multi-domains.

    Now try and see if it works without those.

    Failing that, can you deactivate (don't delete) just deactivate all plugins except buddypress. Then test again.

    If it starts to work, simply reactivate each plugin 1 at a time until the issue returns. This is so we can figure out if it's a plugin conflict.

    Follow this flowchart on this page. https://premium.wpmudev.org/manuals/getting-support/

    Thanks

  • Jack Kitterhing
    • Code Norris

    Hi there @Johanna,

    Hope you're well today, I've tried to check this out, but can't locate the details, did you send the details using your email address attached to your account?

    If you could let me know what email you sent them with that would be great! :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Vaughan
    • Support/SLS MockingJay

    Hi @johanna,

    Sorry for the delay, i've had internet issues with my ISP with disputed bills as they cut me off.

    I've taken a look, it looked like you hadn't replaced the sunrise.php when domain mapping was upgraded. I have updated the sunrise.php on your server.

    If you could enable domain mapping again and give it a whirl, hopefully it should work now.

    Hope this helps

    • Vinod Dalvi
      • WP Unicorn

      Hi Johanna,

      Is this "http:///testnewsunrise/ is your new site." message was displayed?

      Didn't it work for you?

      Have you enabled domain mapping as suggested by @Vaughan in his previous reply?

      Please try to make your reply descriptive and provide as much information as you can so that we can get to the bottom of this faster.

      Regards,
      Vinod Dalvi

  • Johanna
    • The Incredible Code Injector

    I apologise if you had difficulty understanding my reply, but I think if you follow the thread it is self-explanatory.

    The only reason that creating a site worked previously, was because Domain mapping was switched off (in an attempt to diagnose the problem), so no, it never actually worked for me, as I require Domain mapping to be switched on

    Regards
    Johanna

  • Jack Kitterhing
    • Code Norris

    Hi there @Johanna,

    Hope you're well today! :slight_smile:

    I've just done some testing here and it seems to be working now, I enabled Domain Mapping and then added a new site via the network admin with a new email.

    I received the email correctly (screenshot attached). And my test site all works correctly.

    Please advise, if this still isn't working for you. :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Jack Kitterhing
    • Code Norris

    Hi there @Johanna,

    Thanks for the additional information, I've just checked and all your settings are right (.htaccess, domain mapping etc).

    And I indeed can see what you mean when registering through BuddyPress on your install, the site URL comes through as http://sitetitle for example.

    I can't replicate this same issue on my install though, I've notified one of our developers here for their valuable input.

    Thanks!

    Kind regards
    Jack.

  • Jack Kitterhing
    • Code Norris

    Hi there @Johanna,

    Hope you're well today! :slight_smile:

    Thanks for the additional information, I've just done some testing by installing a older version of Domain Mapping when it was possible to map the domain for the main site.

    And that does seem to be the cause here, having the main site mapped causes BuddyPress and on my test install even without BuddyPress at wp-signup.php to assign the incorrect URL.

    You end up with http:///yoursubsite where it should be http://domain.com/yoursubsite, as it doesn't pick up the main site domain, this was a sub directory tests, I haven't tested with sub domains.

    I've just updated the developer on that.

    Thanks!

    Kind Regards
    Jack.

  • Vaughan
    • Support/SLS MockingJay

    Hi @Johanna,

    Sorry for the delay here, this issue is being looked at, the facility for mapping the main domain was actually removed for a specific reasons, which is why we actually prevent that from happening in the later versions.

    I've asked the developer for some more info on this, hopefully he should respond shortly.

    Thanks for your patience.

  • Jose
    • Bruno Diaz

    Hi @Johanna,

    Hope you are doing great today.

    While doing some house cleaning I found this oold thread missed in the queue.

    I believe that this issue was already addressed in the latest releases.
    Could you please confirm?

    Thanks in advance,
    Jose

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.