Ghost: Trying to delete a member through Ghost admin fails with 2 critical errors

Created on 18 Dec 2020  路  3Comments  路  Source: TryGhost/Ghost

Hi!

I'm running Ghost on Digital Ocean droplet (one-click Ghost install). Is this a known (or new) bug or could there be something wrong with my environment on Digital Ocean?

Issue Summary

Deleting a member via Ghost admin fails with An error occurred Unable to update nested relation. [object Object] error. Further more, if I look through logs, I see two different errors:

NAME: IncorrectUsageError
MESSAGE: i18n error: path "errors.api.userMessages.BookshelfRelationsError" was not found

and

NAME: BookshelfRelationsError
CODE: UPDATE_RELATION
MESSAGE: Unable to update nested relation.

See:

Screenshot 2020-12-18 at 15 34 01

and

Screenshot 2020-12-18 at 15 41 43

To Reproduce

  1. Add a new member via Admin manually (or through subscribe form on the Ghost casper theme)
  2. Write a test post and send it to members via Ghost email newsletter
  3. Go to Members > Member that just got the newsletter
  4. Click the Delete member button and confirm delete from the popup
  5. Top of the page shows red alert message with text: _An error occurred Unable to update nested relation. [object Object]_

Expected result would be that the member is deleted.

However, if I haven't yet sent the new member a newsletter (Member activity data does not exist yet), deleting the member works fine. So this might have something to do with deleting a member when member activity data exists?

Technical details:

Running on Digital ocean droplet.

  • Ghost Version: 3.40.2
  • Node Version: 12.18.0
  • Browser/OS: Firefox 83.0 on MacOS Catalina
  • Database: MySQL 5.7.32-0ubuntu0.18.04.1 (Ubuntu)

Any help would be much appreciated. Thanks!

Most helpful comment

Hi :)

I have the same error... When I try to delete a member on my site: https://www.futurenode.dk

I get this error: An error occurred Unable to update nested relation. [object Object]

Server running

Ghost-CLI version: 1.15.3
Ghost version: 3.40.2 (at /var/www/ghost)
Node.js v12.20.0
Mysql Ver 8.0.22-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
Server OS: Ubuntu 20.04 - Installed ghost manually!
Running "nurui" theme

// Thomas

All 3 comments

Hi :)

I have the same error... When I try to delete a member on my site: https://www.futurenode.dk

I get this error: An error occurred Unable to update nested relation. [object Object]

Server running

Ghost-CLI version: 1.15.3
Ghost version: 3.40.2 (at /var/www/ghost)
Node.js v12.20.0
Mysql Ver 8.0.22-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
Server OS: Ubuntu 20.04 - Installed ghost manually!
Running "nurui" theme

// Thomas

I can confirm this issue with Ghost 3.40.2

Node.js v14.15.2
MariaDB 10.5.8
Ghost-CLI version: 1.15.3

I have the exact same issue. You can work around it by connecting to your MySQL database directly and removing the relations manually.

mysql> select batch_id from email_recipients where member_email = '[email protected];
5fe8dbdb7819a027d723ffa2
mysql> delete from email_recipients where member_email = '[email protected];
Query OK, 1 row affected (0.00 sec)

mysql> delete from email_batches where batch_id = '5fe8dbdb7819a027d723ffa2';
Query OK, 1 row affected (0.00 sec)

After doing these steps you will be able to remove the test user from within the ghost admin interface.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RadoslavGatev picture RadoslavGatev  路  3Comments

rishabhgrg picture rishabhgrg  路  3Comments

marcuspoehls picture marcuspoehls  路  4Comments

mattferderer picture mattferderer  路  4Comments

kirrg001 picture kirrg001  路  3Comments