Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Can't change Support Mail Address

Open s3tupw1zard opened this issue 1 year ago • 6 comments

Issue Summary

Hello, I'm getting an error when I want to change the support email on my blogs portal settings.

I installed my blog using docker compose. A few days later I moved the folder with both folders for ghost and mysql to another server.

Here's my docker compose file:

  ghost:
    image: ghost:latest
    container_name: ghost-cms
    restart: always
    depends_on:
      - ghost_db
    environment:
      NODE_ENV: production
      url: https://example.com
      database__client: mysql
      database__connection__host: ghost_db
      database__connection__user: ghost
      database__connection__password: reallysecurepassword
      database__connection__database: ghostdb
      mail__transport: SMTP
      mail__options__host: smtp.example.com
      mail__options__port: 587
      mail__options__auth__user: [email protected]
      mail__options__auth__pass: reallysecuremailpassword
      mail__from: Example.com <[email protected]>
    networks:
      - ghost_net
    volumes:
      - ./ghost/blog/content:/var/lib/ghost/content
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_public"
      - "traefik.http.routers.ghost.entrypoints=websecure"
      - "traefik.http.routers.ghost.rule=Host(`domain.de`)"
      - "traefik.http.routers.ghost.service=ghost"
      - "traefik.http.services.ghost.loadbalancer.server.port=2368"
      - "traefik.http.routers.ghost.tls.certresolver=cfresolver"

  ghost_db:
    image: mysql:latest
    container_name: ghost-db
    restart: always
    command: --pid-file /var/lib/mysql/mysqld.pid
    environment:
      MYSQL_ROOT_PASSWORD: 'reallysecurerootpassword'
      MYSQL_USER: 'ghost'
      MYSQL_PASSWORD: 'reallysecurepassword'
      MYSQL_DATABASE: 'ghostdb'
    networks:
      - ghost_net
    volumes:
      - ./ghost/mysql:/var/lib/mysql

I omitted the traefik Proxy part, because that part works without problems with my domain. I already tried to reset my instance but the result is the same.

Is there a way to fix this?

Thank you for help

Steps to Reproduce

  1. Configure Traefik
  2. Add Ghost and DB to docker-compose.yml as above
  3. Start using docker compose up -d
  4. Go to Ghost web address under portal change [email protected] to something else
  5. Click the link inside the mail that arrived
  6. See an error in Ghost CMS and its logs

Ghost Version

5.74.0

Node.js Version

The version in the docker image

How did you install Ghost?

docker compose

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

ghost     | [2023-11-22 19:10:02] ERROR "PUT /ghost/api/admin/newsletters/verifications/?include=count.active_members%2Ccount.posts" 500 44ms
ghost     | 
ghost     | An unexpected error occurred, please try again.
ghost     | 
ghost     | "Undefined binding(s) detected when compiling SELECT. Undefined column(s): [newsletters.id] query: select `newsletters`.* from `newsletters` where `newsletters`.`id` = ? limit ?"
ghost     | 
ghost     | Error ID:
ghost     |     bcb4faa0-896a-11ee-a8a7-a3e750495518
ghost     | 
ghost     | Error Code: 
ghost     |     UNEXPECTED_ERROR
ghost     | 
ghost     | ----------------------------------------
ghost     | 
ghost     | Error: Undefined binding(s) detected when compiling SELECT. Undefined column(s): [newsletters.id] query: select `newsletters`.* from `newsletters` where `newsletters`.`id` = ? limit ?
ghost     |     at module.exports.prepareError (/var/lib/ghost/versions/5.74.0/node_modules/@tryghost/mw-error-handler/lib/mw-error-handler.js:102:19)
ghost     |     at QueryCompiler_MySQL.toSQL (/var/lib/ghost/versions/5.74.0/node_modules/knex/lib/query/querycompiler.js:110:13)
ghost     |     at Builder.toSQL (/var/lib/ghost/versions/5.74.0/node_modules/knex/lib/query/querybuilder.js:83:44)
ghost     |     at ensureConnectionCallback (/var/lib/ghost/versions/5.74.0/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:4:30)
ghost     |     at Runner.ensureConnection (/var/lib/ghost/versions/5.74.0/node_modules/knex/lib/execution/runner.js:300:20)
ghost     |     at async Runner.run (/var/lib/ghost/versions/5.74.0/node_modules/knex/lib/execution/runner.js:30:19)

Code of Conduct

  • [X] I agree to be friendly and polite to people in this repository

s3tupw1zard avatar Nov 25 '23 08:11 s3tupw1zard

I tested another version of the image and it appears that the error doesn't occur, or to put it in other words, it doesn't prevent it to change the support mail address. In the console I'm getting the same error, but this time the change was successful.

The image I tested was ghost:5.73.2-alpine (here it kinda works like expected)

With versions ghost:5.74.0-alpine, ghost:5 and ghost:5.74 including ghost:latest the described error is present.

s3tupw1zard avatar Nov 25 '23 17:11 s3tupw1zard

can i work on this?

nick2432 avatar Dec 13 '23 15:12 nick2432

mysql:latest is not supported.

MySQL 8 is supported.

markstos avatar Dec 20 '23 17:12 markstos

@royalfig It would be helpful if mentions of "MySQL 8" in docs clarified whether that means

8.0, 8.1, 8.2

or all three.

The issue here seems like it might be due to running a MySQL version that qualifies as MySQL 8, but is newer than intended or tested.

markstos avatar Dec 20 '23 17:12 markstos

@markstos Thanks! I'll confirm this.

royalfig avatar Jan 12 '24 09:01 royalfig

@s3tupw1zard Our recent release updates how email addresses work in Ghost. Are you able to upgrade and see if you still encounter this bug?

royalfig avatar Jan 30 '24 22:01 royalfig

Our bot has automatically marked this issue as stale because there has not been any activity here in some time.

The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR.

We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂

github-actions[bot] avatar May 29 '24 23:05 github-actions[bot]