This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by svenG-14 9 months, 3 weeks ago.

Author Posts
August 6, 2019 at 12:44 pm #4347581


I am trying to:
Change the options at wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Ftranslation-options.php

I expected to see:
Error free rendered page

Instead, I got, at the bottom of the page when it comes to custom post types created with MetaBox plugin:

Fatal error: Uncaught TypeError: Argument 1 passed to Twig\Lexer::__construct() must be an instance of Twig\Environment, instance of Twig_Environment given, called in /public_html/modules/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php on line 650 and defined in /public_html/modules/meta-box-aio/vendor/meta-box/meta-box-builder/vendor/twig/twig/src/Lexer.php:56 Stack trace: #0 /public_html/modules/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(650): Twig\Lexer->__construct(Object(Twig_Environment)) #1 /public_html/modules/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(750): Twig_Environment->tokenize(Object(Twig\Source)) #2 /public_html/modules/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(447): Twig_Environment->compileSource(Object(Twig\Sourc in /public_html/modules/meta-box-aio/vendor/meta-box/meta-box-builder/vendor/twig/twig/src/Lexer.php on line 56

This is most likely to dependencies of both plugins, however I wonder if there is a workaround?

Like a setting that Twig is already loaded or something.

August 6, 2019 at 12:49 pm #4347597


Just disable the Metabox Builder of the All-In-One package.