‘[2016-08-09 10:04:20] WEB.ERROR: An exception has been thrown during the rendering of a template (“Named route not found for name: mytest.view”) in “authed.twig” at line 118. Exception Type: Twig_Error_Runtime [] {“uid”:“fd93c9d”,“method”:“GET”,“route”:"/dashboard/status",“userId”:1}
’
same error with mytest.view inside the authed.twig
please check my classes, in my response 10 minute ago
Perhaps you can create the example in the docs and we can work from there? Or you could add some additional logging in your Middleware to ensure it is being called.
Assuming you have it as you have pasted it above, the only reason the route would not be registered is if your Middleware is not being called. Try removing your try/catch from settings.php and see if you get a different error presented.
The example I have provided for you in the manual (on GitHub) is working on my environment and another environment I have tested it on - baring the template loading issue, which I have already explained - and updated the doc accordingly.
You have taken that document and created something different, based on your own requirements - and it doesn’t work. I can’t help you with that.
Create what is in the docs and then add debugging to work out what is happening - I think it is clear how to do this?
Our requirement is very simple: add an entry in the left menu panel in the main dashboard. I don’t understand why you say we are creating something different… Could you please share with us your test project with a new working menu item named “test” and when pressed it shows a new page? We want to replicate the same behavior for the help/about page. That’s it.
I’m really trying to help you and have written the example in the manual specifically for you. Looking through the code you’ve posted it seems to me like you’ve changed the name of various bits and pieces of the example - which means it doesn’t work. At that point it becomes very difficult to help, because I don’t know what you have actually done.
I’ve asked a colleague (who has never done this before) go through the instructions, step by step to create the same as you are trying to create. The code worked without any issue, but as a result I have added some more detail to the article.
In an effort to make things easier for you i’ve uploaded this copy of the manual to the website.
[2016-08-10 14:41:07] WEB.ERROR: An exception has been thrown during the rendering of a template ("Named route not found for name: test.view") in "authed.twig" at line 119. Exception Type: Twig_Error_Runtime [] {"uid":"1dc5182","method":"GET","route":"/dashboard/status","userId":1}
I finally understand what is happening (the penny has dropped). There has been a bug fix to the Middleware implementation that is due to be released in 1.8.0-rc1. The bug was that Middleware was not being included correctly, which means that even though your code is absolutely correct, its not running.
There aren’t any changes to composer requirements so you can actually download the develop repository on github - i think that was your starting point anyway?