0

Every time I change a view file of type .twig I get this error:

Fatal error: Call to a member function getContent() on a non-object in /pathto/myappbundle/vendor/bundles/Symfony/Bundle/AsseticBundle/Factory/Resource/FileResource.php on line 54

I can resolve this error by doing:

php app/console cache:clear --env=prod; php app/console cache:clear --env=dev

But because of this I have to clear cache every time I change something, even in dev.

If I do the command:

php app/console router:debug

It gives the same error.

I found online someone saying he had the same error and his solution was that one of his html.twig files was actually saved as html.twig.twig. I looked through all my twig files and none were saved like that.

Has anybody ever experienced this or solved this problem, or has any suggestions where I can look to solve this? There is no more specific trace on where this is happening in my code.

4

0 回答 0