Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when trying to render a twig template #1

Closed
razielgn opened this issue Jun 11, 2012 · 2 comments
Closed

Exception when trying to render a twig template #1

razielgn opened this issue Jun 11, 2012 · 2 comments

Comments

@razielgn
Copy link

Fatal error: Uncaught exception 'RuntimeException' with message 'Helper `TwigExtensions` not found.' in /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/lithium/template/view/Renderer.php:308

Stack trace:

#0 /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/li3_twig/template/view/adapter/Twig.php(120): lithium\template\view\Renderer->helper('TwigExtensions')
#1 /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/lithium/core/Object.php(93): li3_twig\template\view\adapter\Twig->_init()
#2 /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/lithium/template/view/Renderer.php(172): lithium\core\Object->__construct(Array)
#3 /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/li3_twig/template/view/adapter/Twig.php(80): lithium\template\view\Renderer->__construct(Array)
#4 /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/lithium/core/Libraries.php(628): li3_twig\template\view\adapter\Twig->__construct(Array)
#5 /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/ in /home/razielgn/dev/php/dreamboard/li3_test_sprint/libraries/lithium/template/view/Renderer.php on line 308
@marcghorayeb
Copy link
Member

Hello,

This is expected if you enable 'extensions' in the library's config. By default I think the repo has 'extensions' => array('TwigExtensions'). Just erase this option from your library.php and you should be fine.

On a side note, this option makes it possible to create custom Twig extensions (filters, tests, etc...). The plugin will look for them in your helper directory.

Hope this helps!

@marcghorayeb
Copy link
Member

Reopen an issue if you still need help but I consider this to be fixed. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants