Sugar Error: [Users:-20006] Database Failure. Please Refer to Sugarcrm.log For Details. [v6.2.1]

  • Updated


When Riva Cloud or Riva On-Premise connects to Sugar 6.2.1 Pro, the following error may occur:

[Users:-20006] INVALID_SOAPXML_RESPONSE : Invalid response content type of 'text/html' but expected 'text/xml'


Examination of the log file would reveal something similar to this:

2012-01-05 11:48:11,816 ERROR [CTP-exu #0] [1142271431] Error occurred during synchronization.
System.InvalidOperationException: Client found response content type of 'text/html; charset=UTF-8', but expected 'text/xml'.
The request failed with the error message:
Database failure. Please refer to sugarcrm.log for details.



This error is related to a bug in the User.php file related to a create_new_list_query function.


Apply the fix recommended in

The file that contains the bug is SUGAR_ROOT/modules/Users/User.php

Depending on the version and edition of Sugar, the line number may be different.

For Sugar Professional 6.2.1, it is line 1722.

The line to replace:

//add null check to end of the Join statement
$ljVal ='  LEFT JOIN '.$ljVal.' and '.$alias.'.id is null ';

Replace with:

//add null check to end of the Join statement
if(preg_match('/_cstm$/', $alias)){
      $ljVal =' LEFT JOIN '.$ljVal.' and '.$alias.'.id_c is null ';
      $ljVal =' LEFT JOIN '.$ljVal.' and '.$alias.'.id is null ';


Applies to

  • Riva Cloud for Sugar 6.2.1.
  • Riva On-Premise for Sugar 6.2.1.

Was this article helpful?




Article is closed for comments.