0

Am i missing something? (symfony 2.5 and php 5.5.9)

the line that create the error {{post.createdAt|date("F d, Y")}}

the error

Ramy Rais
  • 140
  • 2
  • 10
  • Do the other built-in filters/function work? Be sure your loading them corerctly – DarkBee Apr 11 '15 at 20:57
  • how can i check if they are loading correctly? ps: i tried the capitalize filter it work – Ramy Rais Apr 11 '15 at 21:08
  • try some other default filters like `default('value')` or `striptags` – DarkBee Apr 11 '15 at 21:10
  • the stiptags also work – Ramy Rais Apr 11 '15 at 21:16
  • i tried something silly but it worked {{ post.getCreatedAt|createdAt('F d, Y') }} but i got this new error The filter "date" does not exist. Did you mean "date_modify" in @WebProfiler/Profiler/layout.html.twig at line 25 – Ramy Rais Apr 11 '15 at 21:24
  • The filter `date` should be defined in the file `vendor\twig\twig\lib\Twig\Extension\Core.php`. Look if its present (it should be around line line 192 above `date_modify`) – DarkBee Apr 11 '15 at 21:30
  • yes the filter date does not exist but there is a filter named createdAt. how can i force an update of a vender? (as far as i know no body touched the file) – Ramy Rais Apr 11 '15 at 21:35
  • The `date` fitler is availabe as of Twig 1.1 so it should be in there definly. Just try to do a `composer update` if you installed through composer – DarkBee Apr 11 '15 at 21:38
  • well this is weird at least i know where the problem is even with composer update it stay the same but i will figure out a solution. Thank you – Ramy Rais Apr 11 '15 at 21:52
  • Remove the `vendor/twig` directory and run `composer install`. – qooplmao Apr 14 '15 at 08:47
  • yeah i did that and i also i needed delete the cache of composer so therefore he download a new version again – Ramy Rais Apr 15 '15 at 09:04

0 Answers0