Skip to:
Content
Pages
Categories
Search
Top
Bottom

Multisite issue


  • pandraka
    Participant

    @pandraka

    Good Morning,

    WordPress 5.2
    BuddyPress 4.3.0

    I’m in the process of creating a multisite which will contain an existing BuddyPress site. Right now I’m just setting up the site. I’ve created a simple top site, then enabled BuddyPress. When I upload bp-custom.php the site starts to throw errors:

    The plugin generated 3 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Warning: Cannot modify header information – headers already sent by (output started at /home/navalw5/XXX.XXXXwargaming.com/wp-content/plugins/bp-custom.php:7) in /home/navalw5/test3.navalwargaming.com/wp-includes/option.php on line 948

    If I remove the bp-custom.php these errors go away.
    This is the code in bp-custom:
    <?
    add_action( ‘init’, ‘remove_xprofile_links’ );
    function remove_xprofile_links() {
    remove_filter( ‘bp_get_the_profile_field_value’, ‘xprofile_filter_link_profile_data’, 9, 3 );
    }
    >?
    Pretty standard and a direct copy from the production site, I was curious so I just uploaded a blank bp-custom. I still got the errors.

    I had network activated BuddyPress, so I deactivated and then activated the plugin in the main site.

    Still, have the error.

    My intention is to have a multisite / BuddyPress installation. where members can be part of several or just one other department of the organization.

    site/org1
    site/org2
    Site/org3

    each site would have its own groups & forums

    All the research seemed to indicate that BuddyPress / bbpress should be network activated.

    wp-config. currently looks like:

    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    define(‘DOMAIN_CURRENT_SITE’, ‘test3.navalwargaming.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);
    define( ‘BP_ENABLE_MULTIBLOG’, true );

    I’m confused as to the error, should I be using the child theme’s function.php instead? Any help is greately appreciated.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

  • pandraka
    Participant

    @pandraka

    Figured this out. There I had an extra blank line after the last >? There must of been a hidden character there.


    Bigue Nique
    Participant

    @biguenique

    I know this is an old question, but it is good practice to simply avoid the final closing PHP tag (which is ?> and not >? !) in script to prevent the possibility of any extra output. Yes, a new line is actually a character (even 2 characters if your file was edited in Windows)!

    A common cause for the same error is saving a text file in UTF-8 with BOM, an invisible character sequence at the start of the text file used to mark the character encoding (Windows Notepad can do it!). Make sure your editor doesn’t write a BOM when saving.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar