Trouble upgrading to 4.3.3

I was trying to upgrade from version 3.something (sorry I didn’t grab the version I was on) to 4.4.0. I did receive error messages but thought I had worked through them based on feedback wihin the upgrade error messages. However, now my ghost server won’t start up. Error message below.

  • https://infosec.theos-blog.com/
  • What version of Ghost are you using?
    4.4.0
  • What configuration?
    OS: Ubuntu, v20.04.2 LTS
    Node Version: v14.16.1
    Ghost Version: 4.4.0
    Ghost-CLI Version: 1.17.1
  • What browser?
    Firefox 88.0 on Mac OS X
  • What errors or information do you see in the console?
    not-ghost@ghost-new-s-1vcpu-2gb-nyc1-01:/var/www/ghost$ cat /home/not-ghost/.ghost/logs/ghost-cli-debug-2021-05-09T21_47_03_717Z.log
    Debug Information:
    OS: Ubuntu, v20.04.2 LTS
    Node Version: v14.16.1
    Ghost Version: 4.4.0
    Ghost-CLI Version: 1.17.1
    Environment: production
    Command: ‘ghost restart’
    Message: Ghost was able to start, but errored during boot with: alter table members_products add constraint members_products_member_id_foreign foreign key (member_id) references members (id) on delete CASCADE - UNKNOWN_CODE_PLEASE_REPORT: Referencing column ‘member_id’ and referenced column ‘id’ in foreign key constraint ‘members_products_member_id_foreign’ are incompatible.
    Help: Error occurred while executing the following migration: 02-add-members-products-table.js
    Suggestion: journalctl -u ghost_infosec-theos-blog-com -n 50
    Stack: Error: Ghost was able to start, but errored during boot with: alter table members_products add constraint members_products_member_id_foreign foreign key (member_id) references members (id) on delete CASCADE - UNKNOWN_CODE_PLEASE_REPORT: Referencing column ‘member_id’ and referenced column ‘id’ in foreign key constraint ‘members_products_member_id_foreign’ are incompatible.
    at Server. (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:73:28)
    at Object.onceWrapper (events.js:421:28)
    at Server.emit (events.js:315:20)
    at emitCloseNT (net.js:1659:8)
    at processTicksAndRejections (internal/process/task_queues.js:79:21)
  • What steps could someone else take to reproduce the issue you’re having?
    Attempt to upgrade from 3.something to 4.3.3.

ghost doctor output:

not-ghost@ghost-new-s-1vcpu-2gb-nyc1-01:/var/www/ghost$ ghost doctor
:heavy_check_mark: Checking system Node.js version - found v14.16.1
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking system compatibility
:heavy_check_mark: Checking for a MySQL installation

  • sudo systemctl is-active ghost_infosec-theos-blog-com
    ? Sudo Password [hidden]
  • sudo systemctl reset-failed ghost_infosec-theos-blog-com
    :heavy_check_mark: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking binary dependencies
    :heavy_check_mark: Checking free space
    :heavy_check_mark: Checking systemd unit file
    :heavy_check_mark: Checking systemd node version - found v14.16.1

Note: I did get a message regarding compatibility with my theme but thought I could fix them after upgrading. May be theme related.

File: error.hbs
- Replace {{error.code}} with {{error.statusCode}}

File: styles
- The .kg-bookmark-card CSS class is required to appear styled in your theme
- The .kg-bookmark-container CSS class is required to appear styled in your theme
- The .kg-bookmark-content CSS class is required to appear styled in your theme
- The .kg-bookmark-title CSS class is required to appear styled in your theme
- The .kg-bookmark-description CSS class is required to appear styled in your theme
- The .kg-bookmark-metadata CSS class is required to appear styled in your theme
- The .kg-bookmark-icon CSS class is required to appear styled in your theme
- The .kg-bookmark-author CSS class is required to appear styled in your theme
- The .kg-bookmark-publisher CSS class is required to appear styled in your theme
- The .kg-bookmark-thumbnail CSS class is required to appear styled in your theme

Warnings
File: error.hbs
- Replace {{#each}} with {{#foreach}}

File: package.json
- package.json property "engines.ghost-api" is using a deprecated version of Ghost API

You can also check theme compatibility at https://gscan.ghost.org

Please review the full list of breaking changes at Ghost Docs

See this thread and its solution, worked for a lot of people including me!

Thanks @curiousdungbeetle! That worked. I’m up! Much appreciated.

Thank @jebarjonet, he found the solution :slight_smile:

Thanks to you for pointing me to @jebarjonet’s solution @CDB, and thanks to @jebarjonet for figuring it out then.