Page 1 of 1

evalPhp Twig function missing for template

Posted: Mon Nov 08, 2021 3:54 pm
by SarahF20
Hi,

I've upgraded to v3 successfully, but when I add my template as default I get:

Code: Select all

PHP Fatal error:  Uncaught Twig\Error\SyntaxError: Unknown "evalPhp" function.
I saw in change log this function has been removed

Code: Select all

changelog.txt:- Remove evalPhp Twig function - Add Twig LangExtension - Add Twig LayoutExtension - Add Twig UtilExtension - Add Twig YuiExtension - Add default Forma view paths in twig loader
Should I replace twig function with something else?

Thanks in-advance.

Re: evalPhp Twig function missing for template

Posted: Mon Nov 08, 2021 4:19 pm
by alfa24
It seems evalPhp has not been defined as Twig_SimpleFunction, or is not available in your scope.
Unfortunately, 3.0 source code is not offered for free so a public forum can't help.

Re: evalPhp Twig function missing for template

Posted: Mon Nov 08, 2021 5:00 pm
by SarahF20
Thanks for reply,

We've downloaded V3 source code as a member (I mean we purchased).
Is there any special place for members to ask for help?

regards

Re: evalPhp Twig function missing for template

Posted: Mon Nov 08, 2021 5:07 pm
by alfa24
I suppose yes. But I don't know as I'm not a member.

Re: evalPhp Twig function missing for template

Posted: Mon Nov 08, 2021 5:16 pm
by max
SarahF20 wrote: Mon Nov 08, 2021 5:00 pm Thanks for reply,

We've downloaded V3 source code as a member (I mean we purchased).
Is there any special place for members to ask for help?

regards
Hi, there is no special place for members to ask for help. The place for this kind of support is the public forum.
And no, you did not "purchase" Forma. You became a member of forma.association and therefore have special privileges, such as downloading the latest version of Forma.
Company members have even more privileges than individual members.

Technical assistance is for customers.

Here you'll get help from other forum members or from our staff, but with no SLA.

Re: evalPhp Twig function missing for template

Posted: Mon Nov 08, 2021 5:38 pm
by alberto
Hi Sarah, no special place to ask for support, we are here.

It seems you are using your old 2.4 template with the 3.0 version but this won't work properly since many things have changed with the new one.

You should copy the new default standard template, rename it as your template, and apply your customizations.
You can place your style customizations in a file named [yourtemplate]\style\custom.css so it will be easier to manage template upgrades.