Skip Navigation

[Gelöst] Error in toolset-common twig_extensions

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: Fatal error because of Twig dependencies.

Fatal error: Uncaught TypeError: Argument 1 passed to Twig\Environment::addFunction() must be an instance of Twig\TwigFunction, string given

Solution: Update to Types 3.3.3

This support ticket is created vor 5 Jahren, 4 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 10 Antworten, hat 3 Stimmen.

Zuletzt aktualisiert von Mario vor 5 Jahren, 3 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1283339

I am trying to activate newest types plugin and have some dependency problems.

I tried to access admin-page from toolset, for example "Dashboard".

I get an Error, because toolset uses another version of Twig Library.

Fatal error: Uncaught TypeError: Argument 1 passed to Twig\Environment::addFunction() must be an instance of Twig\TwigFunction, string given, called in ...\htdocs\wp-content\plugins\types\vendor\toolset\toolset-common\utility\gui-base\twig_extensions.php on line 36 and defined in ..\htdocs\wp-content\plugins\ob-common\vendor\twig\twig\src\Environment.php on line 852

I am using newer version of Twig with composer "twig/twig": "^2.7".

Any ideas how to solve this? Thanks in advance.

#1283391

I'm not sure about that but I can ask my developers for some advice. Please stand by and I will get some feedback for you.

#1283493

My 2nd tier support team asked me to find out if this version of Twig is a dependency of your own, or a dependency of another theme or plugin? If so, which one?

#1283691

Thank you, Christian.
This is a plugin, developed by my own.
Using the newest version of Twig 2.11.3 (versteckter Link, versteckter Link).
Same like toolset, i am using composer and its classloader. Never had any problems with any other plugins or themes.

Toolset uses obviously the older Twig version 1.32.0 and some deprecated functions. If i switch my Twig version back to same 1.32.0 it works fine.
Would it be possible for toolset to deliver it with newer twig-version?

#1285005

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Mario,

Thank you for your patience, Christian is currently out today, however I checked on the escalated thread for this and it seems our development team has identified the issue and are working on fixing it.

Currently there isn't any workaround from our side but it will definitely be updated.

Thanks,
Shane

#1285653

Thanks Shane. Mario, I will keep this ticket updated as I receive more information from our developers.

#1285673

ok, thanks so far.

#1296997

Our developers have let me know this will be resolved in Types 3.3.4, which is still in development. I will keep you updated here when I have a release date available.

#1297041

good news. thank you Christian.

#1303091

Sorry for the miscommunication, this issue should be resolved in Types 3.3.3 which has already been released. Please let me know if the issue is not completely resolved after updating all Toolset plugins to the latest versions.

#1305209

My issue is resolved now. Thank you!