Unable to open Manage My Applications tab: Call to a member function isWordPressAttached() on a non-object (Searcher.php:105)

Created:

2016-11-16 12:40:49 UTC

Modified:

2017-06-07 07:59:47 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to open Manage My Applications tab: Call to a member function isWordPressAttached() on a non-object (Searcher.php:105)

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Symptoms

Unable to open Applications tab or Manage My Applications , following error appears:

Call to a member function isWordPressAttached() on a non-object (Searcher.php:105)

Following can be found with enabled debug logging :

ERR [panel] Unable to find row by field registryResourceId with value deedb23a-d9f8-4f9f-8e52-3ce5b744c256 in smb_apsInstances table

or

SQL: SELECT `smb_apsInstances`.* FROM `smb_apsInstances` AS `smb_apsInstances` WHERE (`registryResourceId` = 'deedb23a-d9f8-4f9f-8e52-3ce5b744c256')
PHP Fatal error: Call to a member function getWordPress() on a non-object in /opt/psa/admin/plib/Smb/View/List/App/Instances.php on line 118

Cause

The issue was caused by orphan records exists in apsc database.

Resolution

  1. Create a backup of psa and apsc databases - How to backup/restore a Plesk database dump

  2. Find the oprhan records using below commands :

    mysql> select *  from psa.smb_apsInstances where registryResourceId='deedb23a-d9f8-4f9f-8e52-3ce5b744c256';
    Empty set (0.00 sec)

    mysql> select * from apsc.aps_registry_object where uid='deedb23a-d9f8-4f9f-8e52-3ce5b744c256';
    +-------+--------------------------------------+--------------+---------------------+---------+

    | id | uid | type | creation_time | enabled |
    +-------+--------------------------------------+--------------+---------------------+---------+

    | 14962 | deedb23a-d9f8-4f9f-8e52-3ce5b744c256 | aps.resource | 2013-08-21 17:21:29 | y |
    +-------+--------------------------------------+--------------+---------------------+---------+
    1 row in set (0.00 sec)
  3. Delete orphan record entry from 'aps_registry_object' table :

    mysql> delete from apsc.aps_registry_object where uid='deedb23a-d9f8-4f9f-8e52-3ce5b744c256';
    Query OK, 1 row affected (0.41 sec)

Note: following error can appears:

mysql> delete from apsc.aps_registry_object where uid='deedb23a-d9f8-4f9f-8e52-3ce5b744c256';
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`apsc`.`aps_resource`, CONSTRAINT `FK_aps_resource_aps_registry_object` FOREIGN KEY (`registry_object_id`) REFERENCES `aps_registry_object` (`id`))

Disable constraints and remove record:

mysql> set foreign_key_checks=0;
Query OK, 0 rows affected (0.00 sec)

mysql> delete from apsc.aps_registry_object where uid='deedb23a-d9f8-4f9f-8e52-3ce5b744c256';
Query OK, 1 row affected (0.41 sec)

Enable constraints:

mysql> set foreign_key_checks=1;
Query OK, 0 rows affected (0.00 sec)
Have more questions? Submit a request
Please sign in to leave a comment.