# Issues With Static Loading Page on Ghost Blog Webroot

**URL:** <https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172>\
**Category:** Developer help\
**Created:** [January 21, 2019, 8:12am UTC](https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172 "2019-01-21T08:12:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![I\_N](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/i_n/32/3491_2.png) [@I\_N](https://forum.ghost.org/u/I_N)\
**Post date:** [January 21, 2019, 8:12am UTC](https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172/1 "2019-01-21T08:12:01Z")

</div>

Hey there all!

Trying to get a custom static page to load on the webroot rather than the default, while rotating the default to /blog/. Have been trying a number of things that don’t seem to work properly. Not sure where I’m going wrong.

Currently I’m trying:

```
routes:
  /:
    controller: channel
    template: 
      - home

collections:
  /blog/:
    permalink: /blog/{slug}/
    template: 
      - index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

```

however it’s not loading anything different, despite my having home.hbs created in my theme folder.

I’ve also tried

```
routes:
  /: home

collections:
  /blog/:
    permalink: /blog/{slug}/
    template: 
      - index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

```

However that resulted in a slew of errors. Even if the home.hbs is completely blank, the error is the same. Short form of the error is: `Cannot read property 'match' of undefined`. If anyone wants me to post the full ghost-cli log output I can if that’s helpful.

Any assistance is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Kate](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kate/32/35_2.png) [@Kate](https://forum.ghost.org/u/Kate)\
**Post date:** [January 21, 2019, 12:29pm UTC](https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172/2 "2019-01-21T12:29:08Z")

</div>

That sounds like a theme error e.g. a misusage of helpers.

e.g. similar to [this forum topic.](https://forum.ghost.org/t/cannot-read-property-match-of-undefined-undecipherable-error/3606)

The error handling for theme errors needs improving in Ghost. This is not ideal.

---

<div class="post-metadata">

**Author:** ![I\_N](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/i_n/32/3491_2.png) [@I\_N](https://forum.ghost.org/u/I_N)\
**Post date:** [January 22, 2019, 2:52am UTC](https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172/3 "2019-01-22T02:52:24Z")

</div>

Ah I see. I’m using the theme odin if that helps at all.

I figured I could just copy and mod the standard index.hbs and use it as a home.hbs, but that’s not working either. I’ve also just tried a blank one just to test and it errors out just the same.

## Full error below:

```
[2019-01-22 02:46:09] ERROR "GET /" 500 11ms

NAME: InternalServerError
MESSAGE: Cannot read property 'match' of undefined

level: normal

empty
empty
ERROR DETAILS:
    empty

InternalServerError: Cannot read property 'match' of undefined
    at new GhostError (/var/www/ghost/versions/2.6.0/core/server/lib/common/errors.js:10:26)
    at _private.prepareError (/var/www/ghost/versions/2.6.0/core/server/web/shared/middlewares/error-handler.js:42:19)
    at Layer.handle_error (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/layer.js:71:5)
    at trim_prefix (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:315:13)
    at /var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:335:12)
    at next (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:275:10)
    at Layer.handle_error (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/layer.js:67:12)
    at trim_prefix (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:315:13)
    at /var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:335:12)
    at Immediate.next (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:275:10)
    at Immediate.<anonymous> (/var/www/ghost/versions/2.6.0/node_modules/express/lib/router/index.js:635:15)
    at runCallback (timers.js:812:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

TypeError: Cannot read property 'match' of undefined
    at ExpressHbs.declaredLayoutFile (/var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:89:21)
    at parseLayout (/var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:463:27)
    at /var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:582:7
    at getSourceTemplate (/var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:556:16)
    at compileFile (/var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:578:5)
    at /var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:635:12
    at ExpressHbs.loadDefaultLayout (/var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:320:44)
    at ExpressHbs.___express (/var/www/ghost/versions/2.6.0/node_modules/express-hbs/lib/hbs.js:623:8)
    at View.render (/var/www/ghost/versions/2.6.0/node_modules/express/lib/view.js:135:8)
    at tryRender (/var/www/ghost/versions/2.6.0/node_modules/express/lib/application.js:640:10)
    at Function.render (/var/www/ghost/versions/2.6.0/node_modules/express/lib/application.js:592:3)
    at ServerResponse.render (/var/www/ghost/versions/2.6.0/node_modules/express/lib/response.js:1008:7)
    at Object.renderer (/var/www/ghost/versions/2.6.0/core/server/services/routing/helpers/renderer.js:22:9)
    at handleResult (/var/www/ghost/versions/2.6.0/core/server/services/routing/controllers/static.js:44:21)
    at tryCatcher (/var/www/ghost/versions/2.6.0/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/var/www/ghost/versions/2.6.0/node_modules/bluebird/js/release/promise.js:512:31)
```

---

<div class="post-metadata">

**Author:** ![I\_N](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/i_n/32/3491_2.png) [@I\_N](https://forum.ghost.org/u/I_N)\
**Post date:** [January 23, 2019, 6:30pm UTC](https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172/4 "2019-01-23T18:30:16Z")

</div>

Just to test I 777’d the entirety of the currently in-use theme’s directory, which removed all of the errors for some reason. **Now rather than 500 error’ing, the response is 304 & no content is served. Completely blank page regardless of what is in the home.hbs.**

i.e.

```
[2019-01-23 18:28:55] INFO "GET /favicon.ico" 200 2ms
[2019-01-23 18:28:55] INFO "GET /" 304 4ms

```

**Update:** Followed a tutorial seemingly doing the same thing I’m doing, but no progress has been made. If anyone else has had this issue or managed to solve it please let me know 🙂

**Update2:** No luck yet. Not sure why these routes won’t obey me.

**Update3:** Still no luck. Is there some error I should be getting but am missing somewhere along this chain? ghost log is only producing the 304 etc, not seeing any other issues arise though the only thing that’s loading is still the blank page regardless of what’s in the home.hbs.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [February 6, 2019, 6:30pm UTC](https://forum.ghost.org/t/issues-with-static-loading-page-on-ghost-blog-webroot/5172/5 "2019-02-06T18:30:22Z")

</div>

Closed on February 6, 2019, 6:30pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
