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.
The most recent dev version now contains only site name in the og:title property.
function fb_social_init() {
// Add simple OpenGraph metatags
$data = "";
if (variable_get('fb_social_opengraph', 1)) {
$content = drupal_set_title();
$content = $content ? strip_tags($content) : variable_get('site_name', 'Drupal');
//add fbml header meta information
$data = '<meta property="og:title" content="' . $content . '"/>' . "\n";
$data .= '<meta property="og:site_name" content="' . variable_get('site_name', '') . '"/>' . "\n";
// @todo maybe look for images/imagefields uploaded/attached to the node ?
// $data .= '<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>';
}
It looks like the drupal_set_title is returning a null string. Or it can be the drupal_set_title which is returning the site name. In any case it's a causing a major problem for our user.
Comments
Comment #1
udvranto CreditAttribution: udvranto commentedI just reverted back to last BETA and it started working. So the latest DEV is to blame.
Comment #2
jsagotsky CreditAttribution: jsagotsky commentedudvranto,
Thanks for the bug report. I committed the patch from http://drupal.org/node/1416814 too soon. I think I fixed it in comment 8, could you let me know if this helps? http://drupal.org/files/fb_social-init_unsupported_operand_types-1416814...
Comment #3
udvranto CreditAttribution: udvranto commentedjsagotsky,
Thanks for the quick reply and a patch! Since this functionality is heavily used, I cannot toy with it at this moment. I will wait for your next release.