Ghost-CLI: Unable to update from Ghost 1.0 to 1.0.2 - Failed to lookup view "error" in views directory "/var/www/ghost/views"

This issue is a

  • Bug Report
  • Feature Request

Summary

I received the banner message saying 1.0.1 is available (even though 1.0.2 was available at the time). I’m running 1.0 self-hosted.

When I attempt to update ghost with ghost update, it appears to succeed.

[grant@ghost-blog:/var/www/ghost$ ghost update
✔ Checking for latest Ghost version
ℹ Downloading and updating Ghost [skipped]
Running sudo command: systemctl stop ghost_grantwinney-com
[sudo] password for grant:
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
Running sudo command: -E -u ghost /usr/lib/node_modules/ghost-cli/node_modules/.bin/knex-migrator-migrate --init --mgpath /var/www/ghost/current
[2017-07-27 17:19:03] INFO Finished database migration!
✔ Running database migrations
✔ Validating config
Running sudo command: systemctl start ghost_grantwinney-com
✔ Restarting Ghost](url)

The “skipped” output above might be because I attempted this earlier today too, before ghost update --rollback.

After the above runs and ghost restarts, my site only shows this:

Oops, seems there is an error in the error template.

Encountered the error:

Failed to lookup view "error" in views directory "/var/www/ghost/views"

whilst trying to render an error page for the error:

undefined
Failed to lookup view "error" in views directory "/var/www/ghost/views"

I can run ghost update --rollback to bring the site back up.

Steps to Reproduce (for a bug report)

  1. Have site running 1.0 and observe banner showing update available.
  2. Run ghost update and after ghost restarts the site is broken.
  3. Run ghost update --rollback brings the site back up, still as 1.0.

Technical details (will be automatically output by Ghost-CLI if an error occurs):

  • OS: Ubuntu 16.04.2 LTS
  • Node Version: v6.11.1
  • Ghost-CLI Version: 1.0.0
  • Environment:
  • Command:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

Hi @grantwinney, unfortunately you’re suffering from early adoption syndrome 😝 . We found the issue with Disqus just before we went official with 1.0 (i.e. published an announcement blog post). The fix (addition of {{comment_id}}) and subsequent changes to Casper happened in Ghost 1.0.2 and Casper 2.0.1.

Really sorry that this impacted you. The people who caught on to Ghost 1.0 before it was announced may all bump into this, but hopefully we’ll get the error message ironed out quickly so that you can at least see what the problem is!

@ErisDS I had previously forked Casper so I could make a few adjustments without having it get overwritten when I did an update - I didn’t realize failing to update the theme could cause a problem, but I see now why it did. I’ll be doubly careful about that in the future.

I’ve since merged the latest Casper changes from the last few days (commits 3993cbd, cd4e0e0, 2b2d6e6, 35e91ec) and the upgrade worked successfully. I’ll fix my disqus code to match what you’ve recommended too. Thanks so much!! (and thanks @acburdine too)

@grantwinney that’s the right config file - I will test this in production later tonight and see if I can figure out what’s going on 😄