Skip to:
Content
Pages
Categories
Search
Top
Bottom

Error in Bp-Blogs-loader.php

  • @expertscafe

    Participant

    I have wplms theme installed which is integrated with Buddypress. However after latest wordpress upgrade to 4.2.2 I started getting below error.

    "Warning: Invalid argument supplied for foreach() in ../../wp-content/plugins/buddypress/bp-blogs/bp-blogs-loader.php on line 97"

    Below is details of php file and line 97 (highlighted in BOLD)for which error is displayed

    /**
    			 * Filters the post types to track for the Blogs component.
    			 *
    			 * @since BuddyPress (1.5.0)
    			 * @deprecated BuddyPress (2.3.0)
    				<strong>$post_types = apply_filters( 'bp_blogs_record_post_post_types', array( 'post' ) ); *</strong>
    			 * @param array $value Array of post types to track.
    			 */
    		
    
    			foreach ( $post_types as $post_type ) {
    				add_post_type_support( $post_type, 'buddypress-activity' );

    Can you please help me with how to resolve this error

Viewing 2 replies - 1 through 2 (of 2 total)
  • @expertscafe

    Participant

    Sorry 97 line is foreach ( $post_types as $post_type ) {

    @danbp

    Participant

    @expertscafe,

    please use the code button when you post code.

    Why do you think there is an error in BuddyPress ?
    The warning only tells you that foreach doesn’t work correctly on YOUR install. No need to copy BP code, we have it all here. Mentionning the error – without server path- is enought.
    (removed from your topic for security)

    If there would be a BP error, you would find many topics here about that problem. It’s not the case so far i can see.

    First thing to do is to debug.
    Deactivate all plugins but BP, and activate one of WP default’s theme.
    Review BP settings and save your permalinks.
    After that, you reactivate plugins one by one and test… If all is OK, reactivate the actual theme.

    If you see a probleme again, you can get sure it’s your theme. In that case you have to contact the forest support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error in Bp-Blogs-loader.php’ is closed to new replies.
Skip to toolbar