Symptoms
-
Unable to remove a customer or change email in Customers page:
PLESK_ERROR: Call to a member function getServiceDescription() on a non-object (Aps.php:288)
-
The affected customer is suspended and does not own any subscriptions on the server.
Cause
Orphaned records in Plesk database.
Resolution
-
Find username of the affected customer in Customers > JDoe > Username. For the example below, it will be jdoe.
-
Find orphaned records of the username jdoe:
# SELECT id, login, email, roleId, ownerId FROM smb_users WHERE login = ‘jdoe’;
+—-+———-+———————–+——–+———+
| id | login | email | roleId | ownerId |
+—-+———-+———————–+——–+———+
| 69 | jdoe | example.com | 253 | 64 |
+—-+———-+———————–+——–+———+# SELECT * FROM smb_userServicePermissions WHERE userId = 69;
+—–+——–+———————+
| id | userId | servicePermissionId |
+—–+——–+———————+
| 111 | 69 | 332 |
+—–+——–+———————+# SELECT * FROM smb_servicePermissions WHERE id = 332;
+—–+——————-+——————-+—————-+———-+———+
| id | serviceInstanceId | serviceProviderId | permissionCode | class | status |
+—–+——————-+——————-+—————-+———-+———+
| 332 | 171 | 1 | admin | singular | removed |
+—–+——————-+——————-+—————-+———-+———+# SELECT * FROM smb_serviceInstances WHERE id = 171;
+—–+————-+——————-+————————————–+
| id | description | serviceProviderId | externalId |
+—–+————-+——————-+————————————–+
| 171 | WordPress | 1 | d2191b72-0954-4bbe-8ded-da005b2b5178 |
+—–+————-+——————-+————————————–+ -
Remove orphaned records:
# delete from smb_serviceInstances WHERE id = 171;
# DELETE FROM smb_servicePermissions WHERE id = 332;
# DELETE FROM smb_userServicePermissions WHERE userId = 69;