-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Unable to render template RuntimeException for AbstractRestfulController #34
Comments
I've ran into this issue many times as well and haven't found a good solution. One way to recreate this is to extend the AbstractRestfulController and implement the get() action but not the getList() action. Then when you go to the getList route, you get a "template not found" error instead of a "Method Not Allowed" response like any other framework gives. It doesn't make sense for me to have to create a "module-name/controller-name/get-list.phtml" template for every rest controller I create when I don't even want to implement "getList" functionality. Originally posted by @rodmcnew at zendframework/zend-mvc#3 (comment) |
I've stumbled across the same problem as I am currently trying to implement a REST API with ZF2. Afte some research I found out that the So in my understanding the
Am I right?! Originally posted by @scroach at zendframework/zend-mvc#3 (comment) |
https://github.com/karborator/zend-mvc Originally posted by @karborator at zendframework/zend-mvc#3 (comment) |
Is there a reason why AbstractRestfulController returns an array in the pre-implemented methods instead of an JsonModel object? Originally posted by @chaos0815 at zendframework/zend-mvc#3 (comment) |
I get an unable to render template error when i do not over-ride the AbstractRestfulController method.
By default, the response code is set and an array is returned which appears to be picked up and rendered using the default render strategy.
Would it be a good idea to set the response content and return the response or is there something I am missing in the configuration.
I would just like some feedback on this before I make a pull request.
Thanks,
James
Originally posted by @jerv13 at zendframework/zend-mvc#3
The text was updated successfully, but these errors were encountered: