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 &&
            ) ||
        ) {
            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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.