Error buddypress-media/app/main/interactions/RTMediaInteraction.php


#1

Hello, I am getting these errors. Looking for help as to how to solve them. thanks.

Notice: Trying to get property of non-object in /home/domain/public_html/domain/wp-content/plugins/buddypress-media/app/main/interactions/RTMediaInteraction.php on line 305

Notice: Trying to get property of non-object in /home/domain/public_html/domain/wp-content/plugins/buddypress-media/app/main/interactions/RTMediaInteraction.php on line 308


#2

These are notices I am also seeing per above post.

Notice: Trying to get property of non-object in /home/domain/public_html/domain/wp-content/plugins/buddypress-media/app/main/interactions/RTMediaInteraction.php on line 308 NOTICE: wp-content/plugins/buddypress-media/app/main/interactions/RTMediaInteraction.php:305 - Trying to get property of non-object require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/kleo/buddypress.php’), get_header, locate_template, load_template, require_once(’/themes/kleo/header.php’), wp_head, do_action(‘wp_head’), call_user_func_array, WPSEO_Frontend->head, do_action(‘wpseo_head’), call_user_func_array, WPSEO_OpenGraph->opengraph, do_action(‘wpseo_opengraph’), call_user_func_array, WPSEO_OpenGraph->description, apply_filters(‘wpseo_opengraph_desc’), call_user_func_array, RTMediaInteraction->rtmedia_wpseo_og_desc

NOTICE: wp-content/plugins/buddypress-media/app/main/interactions/RTMediaInteraction.php:308 - Trying to get property of non-object require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/kleo/buddypress.php’), get_header, locate_template, load_template, require_once(’/themes/kleo/header.php’), wp_head, do_action(‘wp_head’), call_user_func_array, WPSEO_Frontend->head, do_action(‘wpseo_head’), call_user_func_array, WPSEO_OpenGraph->opengraph, do_action(‘wpseo_opengraph’), call_user_func_array, WPSEO_OpenGraph->description, apply_filters(‘wpseo_opengraph_desc’), call_user_func_array, RTMediaInteraction->rtmedia_wpseo_og_desc

NOTICE: wp-includes/query.php:4564 - Trying to get property of non-object require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/kleo/buddypress.php’), get_footer, locate_template, load_template, require_once(’/themes/kleo/footer.php’), do_action(‘kleo_after_page’), call_user_func_array, kleo_show_side_menu, wp_nav_menu, apply_filters(‘wp_nav_menu_objects’), call_user_func_array, wc_nav_menu_item_classes, is_woocommerce, is_shop, is_page, WP_Query->is_page

NOTICE: wp-includes/query.php:4566 - Trying to get property of non-object require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/kleo/buddypress.php’), get_footer, locate_template, load_template, require_once(’/themes/kleo/footer.php’), do_action(‘kleo_after_page’), call_user_func_array, kleo_show_side_menu, wp_nav_menu, apply_filters(‘wp_nav_menu_objects’), call_user_func_array, wc_nav_menu_item_classes, is_woocommerce, is_shop, is_page, WP_Query->is_page

NOTICE: wp-includes/query.php:4568 - Trying to get property of non-object require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(’/themes/kleo/buddypress.php’), get_footer, locate_template, load_template, require_once(’/themes/kleo/footer.php’), do_action(‘kleo_after_page’), call_user_func_array, kleo_show_side_menu, wp_nav_menu, apply_filters(‘wp_nav_menu_objects’), call_user_func_array, wc_nav_menu_item_classes, is_woocommerce, is_shop, is_page, WP_Query->is_page


#3

I also have this issue. It happens in a group when there are more files than _Number of media per page_. E.g. if number of media per page is 10 and there are 20 files in a buddypress group library, there is a fatal php error.

The reason seems to be with the rtmedia_wpseo_og_desc hook. It expects an array, but once there is +10 files, it gets an object instead.

RTMediaInteraction.php Ln: 307: $rtmedia_query->media[0]


#4