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 thread is resolved. Here is a description of the problem and solution.

Problem: Fatal error I get after installing WPML Multilingual CMS 4.2.6: Fatal error: Uncaught TypeError: Argument 1 passed to Twig_TokenParserBroker::addTokenParser Solution: Installing the latest version of the WooCommerce Multilingual plugin got everything back to normal.

This topic contains 2 replies, has 2 voices.

Last updated by Karsten 3 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
June 12, 2019 at 8:20 am #4001697

Karsten

Fatal error I get after installing WPML Multilingual CMS 4.2.6:
Fatal error: Uncaught TypeError: Argument 1 passed to Twig_TokenParserBroker::addTokenParser() must be an instance of Twig\TokenParser\TokenParserInterface, instance of Twig_TokenParser_For given, called in /srv/www/vhosts/kursiv-software.com/httpdocs/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php on line 1507 and defined in /srv/www/vhosts/kursiv-software.com/httpdocs/wordpress/wp-content/plugins/woocommerce-multilingual/vendor/twig/twig/lib/Twig/TokenParserBroker.php:53 Stack trace: #0 /srv/www/vhosts/kursiv-software.com/httpdocs/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(1507): Twig_TokenParserBroker->addTokenParser(Object(Twig_TokenParser_For)) #1 /srv/www/vhosts/kursiv-software.com/httpdocs/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/twig/twig/lib/Twig/Environment.php(1459): Twig_Environment->initExtension(Object(Twig_Extension_Core)) #2 /srv/www/vhosts/kursiv-software.com/httpdocs/wordpress/wp in /srv/www/vhosts/kursiv-software.com/httpdocs/wordpress/wp-content/plugins/woocommerce-multilingual/vendor/twig/twig/lib/Twig/TokenParserBroker.php on line 53

Link to a page where the issue can be seen:
Fatal error only in the backoffice.

I expected to see:
A working site.

I can restore a backup and avoid making the update. Then it works fine. Deactivating all WPML plug-ins does not solve the issue.

June 12, 2019 at 8:35 am #4001949

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Karsten,

Sorry for this little issue. Can you deactivate the WooCommerce Multilingual plugin, delete it, and install back the previous version (4.6.3) that you can download from here https://wpml.org/account/downloads/, please? Just give this a try and tell me how things work this time.

Thanks,
Radu

July 6, 2019 at 7:02 am #4155187

Karsten

My issue is resolved now. Thank you!