Skip to:
Content
Pages
Categories
Search
Top
Bottom

PHP Deprecated: xprofile cover image


  • nffox
    Participant

    @nffox

    WordPress: 5.4.2
    BuddyPress: Version 6.1.0
    Theme: Buddyapp
    https://ecodominicana.com

    Hello, I’m having a small issue, and can’t figure out how to fix it. Already read a lot of threads and documentation, but It seems I’m missing something.

    Yesterday this error appeared:
    PHP Deprecated: bp_before_xprofile_cover_image_settings_parse_args is deprecated since version 6.0.0! Use bp_before_members_cover_image_settings_parse_args instead. in /var/www/wptbox/wp-includes/functions.php on line 5088

    And it appears only on profile pages, like this one:
    https://ecodominicana.com/members/ecodominicana/profile

    So I created a buddypress.css in my child theme’s CSS folder: wp-content\themes\buddyapp-child\buddypress\css

    And added this code:

        $theme_handle = 'bp-parent-css';
    
        $settings['theme_handle'] = $theme_handle;
    
        /**
         * Then you'll probably also need to use your own callback function
         * @see the previous snippet
         */
         $settings['callback'] = 'bp_legacy_theme_cover_image';
    
        return $settings;
    }
    add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_theme_cover_image_css', 10, 1 );
    add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'your_theme_cover_image_css', 10, 1 );

    Here is the the code in main functions.php

    function kleo_load_files_plugin_compat() {
    	//enqueue child theme style only if activated
    	if ( is_child_theme() ) {
    		if ( is_rtl() ) {
    			wp_enqueue_style( 'kleo-rtl' );
    		}
    		wp_enqueue_style( 'kleo-style' );
    	}

    Any help would be very appreciated. Sorry, I’m a noob in programming, we are a non-profit botanical project, so we can’t afford a programmer…😔

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

  • Varun Dubey
    Participant

    @vapvarun

    @nffox contact you theme support, theme vendor have to remove Deprecated functions from theme
    You can also disable error message using following codes inside the wp-config.php

    Debugging in WordPress

    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    nffox
    Participant

    @nffox

    Hello @vapvarun, thank you for your reply. I already have this same code:
    define( ‘WP_DEBUG_DISPLAY’, false );
    @ini_set( ‘display_errors’, 0 );

    so my code looks like this>>>

    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    define( ‘WP_DEBUG_DISPLAY’, false );
    @ini_set( 'display_errors', 0 );
    
    /* That's all, stop editing! Happy publishing. */

    But it makes no difference.

    Thanks.


    nffox
    Participant

    @nffox

    I just want to disable any error message visibility (in pages, not a LOG). Cause this errors seems to cause no problem to cover image uploading, everything works like a charm, thank you for BuddyPress!!!


    nffox
    Participant

    @nffox

    [Solved] Just needed to put this code at the BOTTOM, not after define( ‘WP_DEBUG_DISPLAY’, false );

    Here is my code:

    @ini_set('display_errors','Off');
    @ini_set('error_reporting', E_ALL );
    
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    define( ‘WP_DEBUG_DISPLAY’, false );
    
    /* That's all, stop editing! Happy publishing. */
    
    /** Absolute path to the WordPress directory. */
    if ( ! defined( 'ABSPATH' ) ) {
    	define( 'ABSPATH', dirname( __FILE__ ) . '/' );
    }
    
    /** Sets up WordPress vars and included files. */
    require_once ABSPATH . 'wp-settings.php';
    
    @ini_set('display_errors','Off');
    @ini_set('error_reporting', E_ALL );

    Hope this helps somebody.

    Cheers, and thanks!


    nffox
    Participant

    @nffox

    This first lines don’t go, sorry:
    @ini_set(‘display_errors’,’Off’);
    @ini_set(‘error_reporting’, E_ALL );

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