Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just updated to the latest and found an issue when going to my stream page.. php throws an error and it seems
that a function was removed in the newer versions..
PHP message: PHP Fatal error: Call to undefined function facebook_status_choose_owner() in /var/www/ph/sites/all/modules/heartbeat_fbss/heartbeat_fbss.module
This code was originally based upon the thread I started here and someone create some code that worked out fine until now.
http://drupal.org/node/1011894
snippet of code
/*Modify the function that returns the status update box to use a heartbeat block instead of a view*/
function heartbeat_fbss_facebook_status_form_display($account = FALSE, $size = FALSE, $heartbeat = FALSE, $title = FALSE) {
if ($title) {
drupal_set_title($title);
}
drupal_add_css(drupal_get_path('module', 'heartbeat_fbss') . '/heartbeat_fbss.css', 'module', 'all', FALSE);
drupal_add_js(drupal_get_path('module', 'heartbeat_fbss') . '/heartbeat_fbss.js','file');
global $user;
if ($account === FALSE) {
$account = facebook_status_choose_owner(FALSE);
}
$selectors = module_invoke_all('facebook_status_refresh_selectors', $account);
$output = '';
$can_post = facebook_status_can_post($account, $user);
if ($can_post) {
$output .= '<div class="facebook_status_update facebook_status_update_main clear-block">'. drupal_get_form('facebook_status_box', $account, $size) .'</div>';
}
Whats can we use now for $account since the function facebook_choose_owner seems to have been removed?
Comments
Comment #1
IceCreamYou CreditAttribution: IceCreamYou commentedFBSS 3.x shouldn't require custom code to integrate with Heartbeat, but in any case it is not a bug that unsupported code that someone else wrote for a different version of FBSS doesn't work.
However, to answer your question, the FBSS 3.x analog to facebook_status_choose_owner() is
facebook_status_determine_context('user')['handler']->find_recipient()
. API documentation is here.Comment #2
gateway69 CreditAttribution: gateway69 commentedThanks for the pointers, Ill see what I can do about the code, I hadn't updated heartbeat and fbss in a while and had code to connect the heartbeat and this module, hence the link to the post In my first post.
thanks