php - Symfony 2.7.18 throws "Unknown 'truncate' filter" error in prod but not in dev -


i learning symfony, coming laravel background. far have found bit quirky, least. ran strange issue , wanted know if has seen this.

i use http://myapp.local/web/app_dev.php route can see dev toolbar , more verbose error messaging. 1 thing noticed when use prod route: http://myapp.local/web/app.php following error:

unknown "truncate" filter in "post/post.html.twig" @ line 12 

the offending line is:

<p> {{ post.body | truncate(400) }} </p> 

why line of code work in dev not prod? i've tried messing cache, etc. nothing seems work. neither app.php nor app_dev.php file has been modified.

check if have in services.yml:

services:       twig.extension.text:          class: twig_extensions_extension_text          tags:               - { name: twig.extension } 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -