Flowrouter dynamic route doesn't work as expected! [Solved!]

Here is my template code:

<template name="singlePost">

and the route:

FlowRouter.route('/UserPosts:id', {
    name: 'singlePost',
    action() {

and here is how I am calling it:
<a href="/UserPosts/{{_id}}">test</a>

note that when I use {{_id}}, I can see the id shown in the page, and when I press test, i can see the link changed and shows the id as well but the template doesn’t load and I see the following errors printed to the console:

 Exception from Tracker recompute function:

Error: No such layout template: notFound [404]
    at BlazeRenderer.proceed (renderer.js:159)
    at BlazeRenderer.startQueue (renderer.js:99)
    at BlazeRenderer.render (renderer.js:91)
    at Route.action [as _action] (routes.js:69)
    at Route.callAction (route.js:311)
    at router.js:517
    at Object.Tracker.nonreactive (tracker.js:603)
    at router.js:502
    at Computation._compute (tracker.js:308)
    at Computation._recompute (tracker.js:324)

What am I doing wrong here?

Do you try to include somewhere a template named notFound?

No, I don’t actually have a template with that name (notFound), it gives 404 error, I think it is the reason of the “notFound” world appearing

Maybe there ist a reference in your code to this notFound Templates? Can you search your whole project for this Keyword?

I had the following route:

FlowRouter.route('*', {
  action() {
    // Show 404 error page

when I click on the test button after commenting the above code, it takes me to an empty page, the dynamic route doesn’t work,

Oh, I just managed to get it working, it was a simple newbie mistake, I added the forward slash in the following FlowRouter.route('/UserPosts:id', to make it FlowRouter.route('/UserPosts/:id'

Great you managed it on your own :slight_smile: Please edit the title and include [solved] at the first place.

Done, thank you for your time,