Articles in this section

Unable to login to Plesk: ERR [panel] Call to a member function getAttribute() on null

Plesk for Windows kb: technical

Applicable to:

  • Plesk Obsidian for Windows

Symptoms

  • The following error is shown when logging in to the Plesk:

ERROR: Call to a member function getAttribute() on a non-object (DefPackageMng.php:231)

Or

ERROR: Call to a member function getAttribute() on null (DefPackageMng.php:259)

  • After logging into Plesk, white screen is displayed and the following errors are displayed in the browser console:

    PLESK_ERROR: TypeError: Cannot read properties of undefined (reading 'config')
    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'config')
    Uncaught (in promise) Error: Cannot query field "webSocket" on type "Config".
    TypeError: Cannot read properties of null (reading 'select')
    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'container')
    TypeError: Cannot read properties of undefined (reading 'logo')
    TypeError: E is undefined

  • Repair Plesk installation options fails to work
  • %plesk_dir%\admin\logs>php_error shows the following error:

    CONFIG_TEXT: [2023-07-05 04:40:17] 2452:64a4f43103ce2 ERR [panel] Call to a member function getAttribute() on null
    [2023-07-05 04:40:49] PHP Warning: DOMDocument::loadXML(): invalid character in attribute value in Entity, line: 2; File: C:\Program Files (x86)\Plesk\admin\plib\DefPackageMng.php, Line: 259
    [2023-07-05 04:40:49] 2452:64a4f451bf81e ERR [panel] PHP Warning: DOMDocument::loadXML(): invalid character in attribute value in Entity, line: 2; File: C:\Program Files (x86)\Plesk\admin\plib\DefPackageMng.php, Line: 259
    [2023-07-05 04:40:49] PHP Warning: DOMDocument::loadXML(): invalid character in attribute value in Entity, line: 2 in C:\Program Files (x86)\Plesk\admin\plib\DefPackageMng.php on line 259
    [2023-07-05 04:40:49] PHP Warning: DOMDocument::loadXML(): attributes construct error in Entity, line: 2; File: C:\Program Files (x86)\Plesk\admin\plib\DefPackageMng.php, Line: 259

Cause

The file %plesk_dir%\admin\db\defpackagemng.xml is absent or corrupted. 

Resolution

  1. Connect to the server via RDP
  2. Move the file %plesk_dir%\admin\db\defpackagemng.xmlto another location (if present).
  3. Open CMD and run the command below to regenerate the defpackagemng.xml file:

    C:\> "%plesk_bin%\defpackagemng.exe" --get --force

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.