Skip to:
Content
Pages
Categories
Search
Top
Bottom

Subdomain Install – Pages Not Found

  • @jamesatwholelifewholeworld

    Participant

    Hi,

    I’ve just installed BP 1.2.7 on WordPress Mu (Networks) 3.0.4 and have applied the default theme to the subdomain ‘Talk’ at http://talk.integraluk.org/ as we want BP to happen on this subdomain so that we don’t have to merge it into our other themes for other subdomains and the root domain. Is this an okay theory?

    http://talk.integraluk.org/

    There’s a problem occuring at the momen because although the homepage of the subdomain seems okay, there are ‘Pages not found’ messages at /activity /members /groups etc., and also /register, for now sign-ups.

    It also seems to be re-directing a few things to the main root website ( http://integraluk.org/ )

    Which will eventually look like this – http://iuk.wholelifewholeworld.com/ – once I’ve moved it across.

    Can anyone help me please as to whether this theory of doing it through a subdomain can work, and what I might be doing wrong?

    It would aslo be ideal if people can use their BP user i.d. for the talk.integraluk.org subdomain to comment on regular posts across the entire site (though that’s not urgent at this stage.

    Thanks,

    James

Viewing 9 replies - 1 through 9 (of 9 total)
  • @djpaul

    Keymaster

    https://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/

    In your wp-config.php:
    `define ( ‘BP_ROOT_BLOG’, 2 );`

    Where 2 is the ID of the site you wish to run BuddyPress on.

    @jamesatwholelifewholeworld

    Participant

    Hi Paul, thanks, still not working yet, though – could there be anything else – I’ve added;

    ‘/** Sets up BuddyPress subdomain indicator. */
    define ( ‘BP_ROOT_BLOG’, 4 );’

    to wp-config.php and uploaded, pretty sure it’s blog 4 – yep, blog ID 4. Checked upload twice, etc. Have Ctrl+F5 refreshed also, but pages still not showing ( http://talk.integraluk.org/ ).

    http://talk.integraluk.org/

    Thanks,

    James

    @jamesatwholelifewholeworld

    Participant

    …(without the ‘backticks’) …..

    `/** Sets up BuddyPress subdomain indicator. */
    define ( ‘BP_ROOT_BLOG’, 4 );`

    @graf1771

    Member

    Hi, we found a solution to this problem, look in bp-core.php:
    /wp-content/plugins/buddypress

    line 21 it states:

    `/* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, 4 );`

    And change the blog ID number on here as well – for some reason it was causing a conflict across teh WP installation.

    @jamesatwholelifewholeworld

    Participant

    Hi all,

    Yes, as keith (graf1771) says, adding the second line after !defined in bb-core.php did it.

    Thanks,

    James

    @wescleveland

    Participant

    I have been struggling with this same problem for about half a day now and finally found this topic. I do have a concern with hard-coding a blog id. I took the following approach (similar to graf1771’s but more generic):

    As already mentioned, line 21 ff. in /wp-content/plugins/buddypress/bp-core.php states:

    `/* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, 1 );`

    instead of changing the “1” to my default blog id, I changed the “1” to “get_current_blog_id()” resulting in:

    `/* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, get_current_blog_id() );`

    Problem solved!

    Since I am new to BP (been playing with it for about 2 days now), I am concerned that this approach may have negative side affects on other BP functionality. Anyone have any thoughts on this?

    @wescleveland

    Participant

    Just ran across this article (https://codex.buddypress.org/extending-buddypress/bp-custom-php/) talking about bp-custom.php. Putting the above code in bp-custom.php is MUCH cleaner than modifying bp-core.php. So, bp-core.php is now back to it’s original state and my new bp-custom.php contains:

    `<?php
    /* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, get_current_blog_id() );
    ?>`

    and all seems good. Haven’t found any yet, but don’t know if there might be any unintended side effects of using get_current_blog_id().

    Thanks BP developers for a GREAT plugin!!!

    @allanf72

    Member

    Thank you all for posting this! I’ve been reading for hours and this has fixed my issues.

    I’m running BP on a network install and want ALL subdomains to have use of BP. It was working on the main install but as I created subdomains, the BP pages (Activity, Members, etc,) was giving me 404 errors. I went down the htaccess rabbit hole for a while and gave up. Started at the beginning and reading thru all the forums that looked related and found this.

    @WesCleveland – The bp-custom.php works like a charm so far. Thanks for posting your solution.

    @djpaul

    Keymaster

    That might work but I can’t guarantee that it will not cause any weird bugs or issues down the line. I’d recommend that you test with this setting, and remove the BP_ROOT_BLOG customisation:

    define ( ‘BP_ENABLE_MULTIBLOG’, true );

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Subdomain Install – Pages Not Found’ is closed to new replies.
Skip to toolbar