Riva CRM Integration - Documentation and Knowledge Base

Sugar: Quotes Module Fails with "INVALID_SOAPXML_RESPONSE : Invalid Response Content Type of 'text/html', ...". (Archived.)

Article ID: 18
Last updated: 19 May, 2016
This issue occurs in a version of Sugar that is no longer supported. If this error occurs, upgrade your version of Sugar.

Versions of Sugar 5.5 and Sugar 6.0 RC have a problem with all queries against the Quotes module.

See Bug Reference: http://www.sugarcrm.com/crm/support/bugs.html?task=view&caseID=cffbdece-bea0-aa11-7f78-4c10eda9cc69

This is the error logged:

ERROR [2472] Exception Occurred:
ERROR [2472] [CL: xebac3a1913fd085c; M:ctor] [Quotes:-20006] INVALID_SOAPXML_RESPONSE : Invalid response content type of 'text/html', but expected 'text/xml'
ERROR [2472] **** EXCEPTION ****************************************************************************************************
ERROR [2472] *     Omni.Connection.SugarCrm.x8a79268e94c1c543: [Quotes:-20006] INVALID_SOAPXML_RESPONSE : Invalid response content type of 'text/html', but expected 'text/xml'
ERROR [2472] *    
ERROR [2472] *******************************************************************************************************************


ERROR [2472] *******************************************************************************************************************
ERROR [2472] **** EXCEPTION ****************************************************************************************************
ERROR [2472] *     System.InvalidOperationException: Client found response content type of 'text/html', but expected 'text/xml'.
The request failed with the error message:
Error retrieving Quote list:  Query Failed: SELECT  quotes.*  , jt0.user_name modified_by_name , jt0.created_by modified_by_name_owner  , 'Users' modified_by_name_mod , jt1.user_name created_by_name , jt1.created_by created_by_name_owner  , 'Users' created_by_name_mod , jt2.user_name assigned_user_name , jt2.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod , ts1.team_count team_count , ts1.created_by team_count_owner  , 'Teams' team_count_mod , CONCAT(IFNULL(tj.name,''),' ',IFNULL(tj.name_2,'')) team_name , tj.created_by team_name_owner  , 'Teams' team_name_mod , jt0.name shipping_account_name, jtl5.account_id account_id , jt6.last_name shipping_contact_name, jtl6.contact_id contact_id , jt7.last_name shipping_contact_id, jtl7.contact_id contact_id , jt8.name account_name, jtl8.account_id account_id , jt9.name billing_account_name, jtl9.account_id account_id , jt10.last_name billing_contact_name, jtl10.contact_id contact_id , jt11.last_name billing_contact_id, jtl11.contact_id contact_id , jt12.user_name modified_user_name , jt12.created_by modified_user_name_owner  , 'Users' modified_user_name_mod FROM quotes   LEFT JOIN  users jt0 ON
jt0.id= quotes.modified_user_id AND jt0.deleted=0
 AND jt0.deleted=0  LEFT JOIN  users jt1 ON
jt1.id= quotes.created_by AND jt1.deleted=0
 AND jt1.deleted=0  LEFT JOIN  users jt2 ON
jt2.id= quotes.assigned_user_id AND jt2.deleted=0
 AND jt2.deleted=0  LEFT JOIN  team_sets ts1 ON
ts1.id= quotes.team_set_id AND ts1.deleted=0
 AND ts1.deleted=0  LEFT JOIN  teams tj ON
tj.id= quotes.team_id AND tj.deleted=0
 AND tj.deleted=0  LEFT JOIN  quotes_contacts jtl6 ON quotes.id=jtl6.quote_id  AND jtl6.deleted=0
 AND jtl6.contact_role='Ship To'
 LEFT JOIN  contacts jt6 ON jt6.id=jtl6.contact_id AND jt6.deleted=0
 AND jt6.deleted=0  LEFT JOIN  quotes_contacts jtl7 ON quotes.id=jtl7.quote_id  AND jtl7.deleted=0
 AND jtl7.contact_role='Ship To'
 LEFT JOIN  contacts jt7 ON jt7.id=jtl7.contact_id AND jt7.deleted=0
 AND jt7.deleted=0  LEFT JOIN  quotes_accounts jtl8 ON quotes.id=jtl8.quote_id  AND jtl8.deleted=0
 AND jtl8.account_role='Bill To'
 LEFT JOIN  accounts jt8 ON jt8.id=jtl8.account_id AND jt8.deleted=0
 AND jt8.deleted=0  LEFT JOIN  quotes_accounts jtl9 ON quotes.id=jtl9.quote_id  AND jtl9.deleted=0
 AND jtl9.account_role='Bill To'
 LEFT JOIN  accounts jt9 ON jt9.id=jtl9.account_id AND jt9.deleted=0
 AND jt9.deleted=0  LEFT JOIN  quotes_contacts jtl10 ON quotes.id=jtl10.quote_id  AND jtl10.deleted=0
 AND jtl10.contact_role='Bill To'
 LEFT JOIN  contacts jt10 ON jt10.id=jtl10.contact_id AND jt10.deleted=0
 AND jt10.deleted=0  LEFT JOIN  quotes_contacts jtl11 ON quotes.id=jtl11.quote_id  AND jtl11.deleted=0
 AND jtl11.contact_role='Bill To'
 LEFT JOIN  contacts jt11 ON jt11.id=jtl11.contact_id AND jt11.deleted=0
 AND jt11.deleted=0  LEFT JOIN  users jt12 ON
jt12.id= quotes.modified_user_id AND jt12.deleted=0
 AND jt12.deleted=0 where ((quotes.date_modified >= '2010-06-01 16:44:35' AND quotes.date_modified <= '2010-06-09 18:07:58') AND (quotes.assigned_user_id = '1')) AND quotes.deleted=0::MySQL error 1054: Unknown column 'jt0.name' in 'field list'
ERROR [2472] *        at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
   at SugarCrm.Soap.sugarsoap.Endget_entry_list(IAsyncResult asyncResult)
   at Omni.Library.Async.x4ee68f9a8594de5b.x473ac9ee8a64c48e(IAsyncResult x13391fccd2d5d483)
ERROR [2472] *************************************************************************************************************

A fix for this has been posted to the SugarCRM Forums - www.sugarcrm.com/forums/showthread.php?t=57561

A copy of the fix is kept here as an archive:

mfleeger mfleeger is offline
Advanced Support Engineer
Join Date: Dec 2005
Location: Pittsburgh, PA, US
Posts: 38
Lightbulb Re: SOAP failure of get_entry_list for Quotes moudle running Sugar 5.5 (build 6653)

I think I found a solution to this earlier today. It is not related to web services specifically, but to Quotes and get_list()...

Please try to open "modules/Quotes/vardefs.php" and notice the following code;
 'shipping_account_name' =>
join_name is set to be 'jt0', which conflicts with the jt name for users. So, when it tries to get users.name, it will fail because such a thing does not exist. :-)

My solution was to do the following:
I am still gathering data as to what else this could adversely change, but it does allow get_list (via SugarBean) and get_entry_list (via SOAP) to begin to work.

Please also note that you should clear the vardefs cache immediately after making this change.

Article ID: 18
Last updated: 19 May, 2016
Revision: 3
Views: 11649
Also listed in

External links