Cannot remove a subscription: Call to a member function getRootPath () on a non-object (Abstract.php: 141)

Created:

2016-11-16 12:41:56 UTC

Modified:

2017-08-08 13:29:45 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot remove a subscription: Call to a member function getRootPath () on a non-object (Abstract.php: 141)

Applicable to:

  • Plesk 12.5 for Windows

Symptoms

Cannot remove a subscription:

ERROR: Call to a member function getRootPath() on a non-object (Abstract.php:143)

Cause

Missing entry in serviceinstances table in psa database for the subscription:

mysql> select * from serviceinstances where servicePackageId=2295;
Empty set (0.00 sec)

Resolution

  1. Enable Plesk debug logging and search for the error entry mentioned above in %plesk_dir%admin\\logs\\php_error.log . Find SELECT operation from ServiceInstances table above the error entry in the log, like the following:

    2016-08-29 23:02:42] DEBUG [dbquery] [70] SQL: SELECT `ServiceInstances`.* FROM `ServiceInstances` AS `ServiceInstances` WHERE (`servicePackageId` = 2295)
  2. Disable Plesk debug logging

  3. Back up Plesk database .

  4. Recreate records in the serviceinstances table with the servicePackageId from step #1:

    > insert into serviceinstances (id,serviceInstallationId,ServicePackageId,reference,status,enabled) values (4387,1,2295,'79D45A60-6E14-11E6-BDF4-0800200c9A66',1,1)
    > insert into serviceinstances (id,serviceInstallationId,ServicePackageId,reference,status,enabled) values (4388,2,2295,'78D45A60-6E14-11E6-BDF4-0800200c9A66',1,1)

where:

  • serviceInstallationId as id of service from psa.ServiceInstallations table
  • servicePackageId as id of example.com domain
  • reference as uuid generated by uuidgen utility

Additional info

Creation of hosting on subscription fails with error: Call to a member function getRootPath () on a non-object (Abstract.php: 141)

Have more questions? Submit a request
Please sign in to leave a comment.