paulmassen / grav-plugin-seo

Manage your site’s meta tags for display in search engine results or social media networks. Create and manage json-ld microdata. Includes an easy-to-use live preview feature.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GRAV crashes with `Call to undefined method Symfony\Polyfill\Mbstring\Mbstring::mb_ord();`

codiflow opened this issue · comments

After the recent update of GRAV and all plugins (Grav v1.5.8 - Admin v1.8.19) I got the following error message when I tried to edit any page content:

Call to undefined method Symfony\Polyfill\Mbstring\Mbstring::mb_ord();

Stack trace:
grav.CRITICAL: Call to undefined method Symfony\Polyfill\Mbstring\Mbstring::mb_ord() - Trace: #0 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Extension/Core.php(1153): mb_ord('\xC3\xBC', 'UTF-8') #1 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Extension/Core.php(1262): twig_ord('\xC3\xBC') #2 [internal function]: _twig_escape_html_attr_callback(Array) #3 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Extension/Core.php(1089): preg_replace_callback('#[^a-zA-Z0-9,\\....', '_twig_escape_ht...', '<li data-collec...') #4 /var/www/html/DOMAIN/htdocs/cache/twig/05/05f5385d938fb33600307b00a2a3226008a50865416f14004c9e120a6747b00f.php(489): twig_escape_filter(Object(Grav\Common\Twig\TwigEnvironment), '<li data-collec...', 'html_attr') #5 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_a1c48636c5c4d793f18b8e491fb7e0e186661b24db2ce32409242f6ca978f55f->block_contents(Array, Array) #6 /var/www/html/DOMAIN/htdocs/cache/twig/53/532fd7674d0a7da152ddf03dadfe7f1b53c511258538a9df1c1e2b7efc1cda88.php(72): Twig_Template->displayBlock('contents', Array, Array) #7 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_8af90baaa9010a6cf749e3477a0a95af0d00cee8388467a19d80347df0616764->block_field(Array, Array) #8 /var/www/html/DOMAIN/htdocs/cache/twig/53/532fd7674d0a7da152ddf03dadfe7f1b53c511258538a9df1c1e2b7efc1cda88.php(52): Twig_Template->displayBlock('field', Array, Array) #9 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Template.php(428): __TwigTemplate_8af90baaa9010a6cf749e3477a0a95af0d00cee8388467a19d80347df0616764->doDisplay(Array, Array) #10 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Template.php(399): Twig_Template->displayWithErrorHandling(Array, Array) #11 /var/www/html/DOMAIN/htdocs/cache/twig/05/05f5385d938fb33600307b00a2a3226008a50865416f14004c9e120a6747b00f.php(37): Twig_Template->display(Array, Array) #12 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Template.php(428): __TwigTemplate_a1c48636c5c4d793f18b8e491fb7e0e186661b24db2ce32409242f6ca978f55f->doDisplay(Array, Array) #13 /var/www/html/DOMAIN/htdocs/vendor/twig/twig/lib/Twig/Template.php

To solve this issue I tried everything like installing all polyfill/php/mbstring/iconv packages via apt but the error still persisted.

I checked the availability of the iconv extension with the command php7.0 -ri iconv and the result was as follows:

iconv

iconv support => enabled
iconv implementation => glibc
iconv library version => 2.24

Directive => Local Value => Master Value
iconv.input_encoding => no value => no value
iconv.output_encoding => no value => no value
iconv.internal_encoding => no value => no value

After several hours of searching for the cause of the problem I found out that it was gone after disabling this SEO plugin...

do u have mbstring enabled in your php.ini?

Looks so

php7.0 --ri mbstring

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled
libmbfl version => 1.3.2
oniguruma version => 5.9.6

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) backtrack check => On
Multibyte regex (oniguruma) version => 5.9.6

Directive => Local Value => Master Value
mbstring.language => neutral => neutral
mbstring.detect_order => no value => no value
mbstring.http_input => no value => no value
mbstring.http_output => no value => no value
mbstring.internal_encoding => no value => no value
mbstring.substitute_character => no value => no value
mbstring.func_overload => 0 => 0
mbstring.encoding_translation => Off => Off
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.strict_detection => Off => Off

Strange about all this stuff is that it worked like a charm before the GRAV / SEO-plugin update

Looks like this was solved in another thread!