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

default template suffix #23

Closed
weierophinney opened this issue Dec 31, 2019 · 5 comments
Closed

default template suffix #23

weierophinney opened this issue Dec 31, 2019 · 5 comments

Comments

@weierophinney
Copy link
Member

Using composer to install zf2 skeleton along with developer tools. After enabling it I am getting server errors, like:

PHP Fatal error:  Uncaught exception 'Zend\\View\\Exception\\RuntimeException' with message 'Zend\\View\\Renderer\\PhpRenderer::render: Unable to render template "zend-developer-tools/toolbar/zendframework"; resolver could not resolve to a file' in C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zendframework\\library\\Zend\\View\\Renderer\\PhpRenderer.php:499
Stack trace:
#0 C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zend-developer-tools\\src\\ZendDeveloperTools\\Listener\\ToolbarListener.php(203): Zend\\View\\Renderer\\PhpRenderer->render(Object(Zend\\View\\Model\\ViewModel))
#1 C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zend-developer-tools\\src\\ZendDeveloperTools\\Listener\\ToolbarListener.php(148): ZendDeveloperTools\\Listener\\ToolbarListener->renderEntries(Object(ZendDeveloperTools\\ProfilerEvent))
#2 C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zend-developer-tools\\src\\ZendDeveloperTools\\Listener\\ToolbarListener.php(137): ZendDeveloperTools\\Listener\\ToolbarListener->injectToolbar(Object(ZendDe in C:\\Users\\Milan\\workspace\\HopkaupZEND\\vendor\\zendframework\\zendframework\\library\\Zend\\View\\Renderer\\PhpRenderer.php on line 499

adding 'default_template_suffix' key to module.config.php:

return array(
    'view_manager' => array(
        'default_template_suffix' => 'phtml',
        'template_path_stack' => array(
            'zenddevelopertools' => __DIR__ . '/../view',
        ),
    ),
);

fixes the issue.


Originally posted by @minow at zendframework/zend-developer-tools#94

@weierophinney
Copy link
Member Author

I got a similar issue, would you please help me solve it?
Thanks!
untitled


Originally posted by @jerrybk108 at zendframework/zend-developer-tools#94 (comment)

@weierophinney
Copy link
Member Author

We cannot enforce the default template suffix within ZDT, as it would override any settings provided by other users.


Originally posted by @Ocramius at zendframework/zend-developer-tools#94 (comment)

@weierophinney
Copy link
Member Author

Actually, this can be fixed by providing a direct template map, instead of a template path stack.


Originally posted by @Ocramius at zendframework/zend-developer-tools#94 (comment)

@weierophinney
Copy link
Member Author

in my case i fix it through:
// 'zenddevelopertools' => DIR . '/../view',
'ZendDeveloperTools' => DIR . '/../view',
in config/autload/config.php


Originally posted by @findli at zendframework/zend-developer-tools#94 (comment)

@samsonasik
Copy link
Member

Should be fixed now since path is now same with view directory with dashed separator. Please re-create issue if problem persist. Closing.

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