Hello,
I am a beginner in Drupal 8. I created a module following some tutorials. After I installed that module in Drupal 8 (8.0.1) version. It is creating problems with entire Drupal site. After installing that module, I am able to login as admin user, but unable to access any of the admin sections.
I am just encountering this error. "The website encountered an unexpected error. Please try again later." which is a serious issue. I checked the watchdog logs in the database. Please see the error log below:
"
| php | a:5:{s:5:"%type";s:58:"Symfony\Component\Routing\Exception\RouteNotFoun
dException";s:8:"@message";s:37:"Route "hello.content" does not exist.";s:9:"%fu
nction";s:51:"Drupal\Core\Routing\RouteProvider->getRouteByName()";s:5:"%file";s
:70:"C:\wamp\www\drupal_test\core\lib\Drupal\Core\Routing\RouteProvider.php";s:5
:"%line";i:191;} |
"
I attached my module here for further testing.
Comments
Comment #2
kirantej_p commentedComment #3
dawehnerhello.contentbut your code uses
so the route name is
helloComment #4
kirantej_p commentedCan you please elaborate your update?
When I tried to access the '/say_hello' path, it is giving the result and the error when tried to echo in the Controller function.
Comment #5
almaudoh commentedChange
hello:tohello.content:in your module's *.routing.yml file.Comment #6
kirantej_p commentedYes. Also, I cleared cache and then it worked. Thanks guys. :)
Comment #8
thirstysix commentedsame issue in my custom module.
Symfony\Component\Routing\Exception\RouteNotFoundException: Route -------- does not exist, in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 187 of core\lib\Drupal\Core\Routing\RouteProvider.php).
how to rectify this issue. I can't able to view other pages.
Comment #9
cilefen commentedIt is not possible to offer advice without seeing your code.
Comment #10
aswathyajish commentedI have the same error in status report when I upgraded drupal core to 8.6.16.
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.webform_ui.element.add_page" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 201 of /opt/web/core/lib/Drupal/Core/Routing/RouteProvider.php).