Articles in this section

Unable to remove a customer: getServiceDescription() on a non-object (Aps.php:288)

kb: technical Plesk Obsidian Plesk Onyx AnswerBot

Applicable to:

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

  1. Log into Plesk.
  2. Find username of the affected customer in Customers > JDoe > Username. For the example below, it will be jdoe.
  3. Connect to the server via SSH/via RDP.
  4. Create Plesk database backup.
  5. Access Plesk database.
  6. 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 |
    +-----+-------------+-------------------+--------------------------------------+

  7. Remove orphaned records:

    # delete from smb_serviceInstances WHERE id = 171;

    # DELETE FROM smb_servicePermissions WHERE id = 332;

    # DELETE FROM smb_userServicePermissions WHERE userId = 69;

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.