Custom view settings menu returns error after upgrade: Call to a member function getPermissions() on a non-object

Created:

2016-11-16 12:39:57 UTC

Modified:

2017-08-16 18:30:20 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Custom view settings menu returns error after upgrade: Call to a member function getPermissions() on a non-object

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 12.5 for Windows

Symptoms

Custom View Settings menu ( Tools & Settings ) displays the following error:

Call to a member function getPermissions() on a non-object

The following error can be found from %plesk_dir%admin\\logs\\php_error :

PHP Fatal error:  Call to a member function getPermissions() on null in C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\plib\\AdminPanel\\Form\\Final\\ServicePlan\\AdminPlanHostingPermissions.php on line 31

Plesk was upgraded recently. Initial upgrade attempt has failed, but upgrade got finished recently.

Cause

Not all upgrade actions were finished.

Resolution

Execute the following post-upgrade scripts:

  • Linux:

     # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/scripts/create_default_simple_template.php
    # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/scripts/upgrade_admin_simple_plan_permissions_1013.php
  • Windows:

    Make sure there is a row for Admin plan in psa database:

    mysql> SELECT `Templates`.* FROM `Templates` AS `Templates` WHERE (`type` = 'domain' AND `owner_id` = 1);
    +----+--------------+----------+--------+-------------+
    | id | name | owner_id | type | external_id |
    +----+--------------+----------+--------+-------------+
    | 1 | Admin Simple | 1 | domain | NULL |
    +----+--------------+----------+--------+-------------+
    1 row in set (0.00 sec)

    Execute the script:

    %plesk_bin%\\php.exe "%plesk_dir%admin\\plib\\scripts\\upgrade_admin_simple_plan_permissions_1013.php"
Have more questions? Submit a request
Please sign in to leave a comment.