Support Forum
Hello, we have just updated MB views and broke our site with a following error:
Fatal error: Uncaught TypeError: Argument 1 passed to twig_get_attribute() must be an instance of eLightUp\Twig\Environment, instance of MetaBox\Dependencies\Twig\Environment given,
called in ... meta-box-builder/dependencies/Twig/Environment.php(358) : eval()'d code on line 37 and defined in ... mb-views/vendor/elightup/twig/Twig/Extension/CoreExtension.php:1518 Stack trace: #0 ... meta-box-builder/dependencies/Twig/Environment.php(358) : eval()'d code(37): twig_get_attribute() #1 ... meta-box-builder/dependencies/Twig/Template.php(394): __TwigTemplate_6f9b449e9f960c747df8d43a7819e098f058f29b28f552379f284121e19909eb->doDisplay() #2 ... meta-box-builder/dependencies/Twig/Template.php in ... mb-views/vendor/elightup/twig/Twig/Extension/CoreExtension.php on line 1518
There are multiple blocks causing the same error. It dies when mb_get_block_field is called.
e.g.
{% set simage = mb.mb_get_block_field( 'abra_sikmina_image' ) %}
As temporary workaround this seem to work:
function twig_get_attribute(/*Environment*/ $env, /*Source*/ $source,
But, there are many other methods that suffer the same problem and in some cases the error goes deeper and can't be fixed this way. So we can fix one View/Custom Field, but certainly not all, thus breaking multiple pages with fatal errors.
What could we do about that?
Thank you.
Hi,
There are some changes in the codebase from the new version of MB Views 1.10.1. So if you have a license AppSumo Tier 3, please use the plugin Meta Box AIO instead of some single Meta Box extension to avoid errors with deprecated functions/classes.
Oh, that I did not realized.
So removing these separate plugins:
And leaving only Meta Box and Meta Box AIO seem to work just fine.
While keeping active all extensions we need in an Extension tab of the Meta Box plugin itself.
Thank you!