<p>The problem was specific to my local set up.  The dockerfile for this project did not mount the entire /web/ folder, so the live application was ignoring local changes I made to it.</p>
<p>Solution:
Change dockerfile to mount the whole web folder.</p>

CC BY-SA 4.0
2022-03-17T17:00:39.320Z
2022-03-17T17:00:39.320Z
vlasits
<p>I'm pretty new to craft and I inherited a site that hosts a map from MapBox as a static html file in the <code>/web</code> folder, so something like <code>/web/map/old-map/index.html</code>.  Hitting <code>mysite.org/map/old-map</code> directly returns the map, as expected.</p>
<p>So I figured that if I duplicated the <code>old-map</code> folder and renamed it <code>new-map</code> I would instantly see the old map in the new map directory at <code>mysited.org/map/new-map</code>.  But instead I get:</p>
<pre><code>81828384858687888990919293949596979899    {
        // Does that template exist?
        if (
            (
                Craft::$app-&gt;getConfig()-&gt;getGeneral()-&gt;headlessMode &amp;&amp;
                Craft::$app-&gt;getRequest()-&gt;getIsSiteRequest()
            ) ||
            !$this-&gt;getView()-&gt;doesTemplateExist($template)
        ) {
            throw new NotFoundHttpException('Template not found: ' . $template);
        }
 
        // Merge any additional route params
        $routeParams = Craft::$app-&gt;getUrlManager()-&gt;getRouteParams();
        unset($routeParams['template'], $routeParams['template']);
        $variables = array_merge($variables, $routeParams);
 
        return $this-&gt;renderTemplate($template, $variables);
    }
 1. craft\controllers\TemplatesController::actionRender('map/new-map', [])
</code></pre>
<p>So I checked the Routes on the site to see if the previous dev had made a special route for old-map.  Nope.</p>
<p>So I checked Retour to see if there were any relevant redirects there.  Nope.</p>
<p>So I checked the <code>.htaccess</code> file to see if a special accommodation had been made for the original dev's map.  As expected, nope.  Just the regular Craft <code>.htaccess</code> file.</p>
<p>I also reset the cache which I didn't really expect to have a salutary effect and it didn't.</p>
<p>Then I ran out of ideas.  Anyone else have one?</p>

<craft3><routing>
"Template not found" error when attempting to access static web page
# "Template not found" error when attempting to access static web page

(Asked by: username_0 on 2022-03-17)

I'm pretty new to craft and I inherited a site that hosts a map from MapBox as a static html file in the /web folder, so something like /web/map/old-map/index.html.  Hitting mysite.org/map/old-map directly returns the map, as expected.
So I figured that if I duplicated the old-map folder and renamed it new-map I would instantly see the old map in the new map directory at mysited.org/map/new-map.  But instead I get:
81828384858687888990919293949596979899    {
        // Does that template exist?
        if (
            (
                Craft::$app->getConfig()->getGeneral()->headlessMode &&
                Craft::$app->getRequest()->getIsSiteRequest()
            ) ||
            !$this->getView()->doesTemplateExist($template)
        ) {
            throw new NotFoundHttpException('Template not found: ' . $template);
        }
 
        // Merge any additional route params
        $routeParams = Craft::$app->getUrlManager()->getRouteParams();
        unset($routeParams['template'], $routeParams['template']);
        $variables = array_merge($variables, $routeParams);
 
        return $this->renderTemplate($template, $variables);
    }
 1. craft\controllers\TemplatesController::actionRender('map/new-map', [])

So I checked the Routes on the site to see if the previous dev had made a special route for old-map.  Nope.
So I checked Retour to see if there were any relevant redirects there.  Nope.
So I checked the .htaccess file to see if a special accommodation had been made for the original dev's map.  As expected, nope.  Just the regular Craft .htaccess file.
I also reset the cache which I didn't really expect to have a salutary effect and it didn't.
Then I ran out of ideas.  Anyone else have one?

**Tags:** craft3, routing


---

## 1 answers

### Answer by username_0 on 2022-03-17. Score: 5

The problem was specific to my local set up. The dockerfile for this project did not mount the entire /web/ folder, so the live application was ignoring local changes I made to it.

Solution:
Change dockerfile to mount the whole web folder.


---

