Saltar navegación

[Resuelto] Error in toolset-common twig_extensions

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 5 años, 7 meses. 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.

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)

Etiquetado: 

Este tema contiene 10 respuestas, tiene 3 mensajes.

Última actualización por Mario hace 5 años, 6 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#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 (enlace oculto, enlace oculto).
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

Idiomas: Inglés (English )

Zona horaria: 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!