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?
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:

and

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?
Running on Digital ocean droplet.
Any help would be much appreciated. Thanks!
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.
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