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.