Articles in this section

Unable to connect to Plesk 18.0.80 from WHMCS: This element is not expected

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk Obsidian is updated to version 18.0.80 or later.
  • WHMCS is connected to the Plesk server.
  • When performing an action from WHMCS (for example, syncing accounts, or suspending/unsuspending a service), the following error appears:

    CONFIG_TEXT: Module Command Error
    Error code: 1014. Error message: Parser error: Request is invalid. Error in line 2: Element 'domain': This element is not expected. Expected is one of ( request-settings, server, customer, webspace, subdomain, dns, db_server, mail, certificate, site-alias ).

Cause

Plesk 18.0.80 began validating all XML API requests against the API schema. Requests that used a legacy or unversioned protocol version were not validated at all before that. Older versions of the WHMCS Plesk module send suspend and unsuspend requests in a format that has not been valid since protocol version 1.6.3.0.

This was a bug in the WHMCS Plesk module and is fixed in WHMCS 9.0.8 (tracked as WHMCS-27532 and WHMCS-27812 in the WHMCS Change log).

Resolution

In order to resolve this, make sure WHMCS is updated to version 9.0.8 or later.

If WHMCS cannot be updated right away, the workaround is to suspend and activate subscriptions in Plesk directly:

  1. Log into Plesk (not through WHMCS).
  2. Go to Websites & Domains.
  3. Use the subscription's Suspend / Activate action to suspend or unsuspend the service manually.
  4. Repeat this manually for each affected subscription until WHMCS is updated.
Was this article helpful?

Comments

3 comments
Date Votes
  • Unfortunately still getting error:
     

     Retry Response: Error code: 1014. Error message: Parser error: Request is invalid. Error in line 2: Element 'domain': This element is not expected. Expected is one of ( request-settings, server, customer, webspace, subdomain, dns, db_server, mail, certificate, site-alias ).
    
    0
  • One man helped on WHMCS forum:
     

    Edit: /modules/servers/plesk/templates/api/1.0.0.0/webspace_set_status.tpl
    
    Replace the root node (and its closing value) so that instead of <domain> and </domain> they read <webspace> and </webspace>
    0
  • Fix Error:
    /modules/servers/plesk/templates/api/1.0.0.0/webspace_set_status.tpl

    <!-- Copyright 1999-2016. Parallels IP Holdings GmbH. --> <webspace> <set> <filter> <name><?php echo $domain; ?></name> </filter> <values> <gen_setup> <status><?php echo $status; ?></status> </gen_setup> </values> </set> </webspace>
     

    0

Please sign in to leave a comment.