Closed (fixed)
Project:
Open Graph meta tags
Version:
7.x-1.2
Component:
Miscellaneous
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2011 at 00:56 UTC
Updated:
2 Jun 2012 at 16:51 UTC
Jump to comment: Most recent
Comments
Comment #1
erikandershed commentedHi, I also have this problem..
Fatal error: Call to undefined function mb_substr() in /default/modules/opengraph_meta/opengraph_meta.common.inc on line 127
Please help
Comment #2
markchitty commentedessentially, PHP is missing the mbstring extension.
you can either, enable the mbstring extension in PHP, as outlined here:
http://uk.php.net/manual/en/mbstring.installation.php
or you can use 'substr' instead of 'mb_substr' (but only if you are running a site which does not use multibyte character encoding). change line 127 of opengraph_meta.common.inc to:
$ret[self::DESCRIPTION] = !empty($node->body) ? substr(strip_tags($node->body),0,200) : $node->title;although this is less than ideal and the 'fix' will get wiped out if you ever upgrade your module.
m
Comment #3
mattwmc commentednevermind, didn't have mb_string ticked in easy apache
Comment #4
hiddentao commentedYep, this is due to the missing mbstring extension.
Comment #5
Anonymous (not verified) commentedThe module should actually use the function "drupal_substr()" instead of "mb_substr()", since drupal_substr automatically checks if the unicode library is installed and provides a fallback if the library is missing.
Comment #6
hiddentao commentedFixed in next release.