by SuiteCRM

The Ultimate Outlook Plugin Has Arrived - In response to user requests, SuiteCRM have created the ultimate Outlook plugin which is maintained by SuiteCRM developers. Our plugin supports Outlook 2010 upwards and includes two way synchronisation with CRM, Calender, Calls, Meeting, Tasks and Email Archiving.

Cancel at any time!
Free Trial

#440 - Sync contact - Query error in module Accounts - Error 500

Closed Bug? created by karol.m 2 years ago

Hi,
I resolved problem with loging but I've another problem with sync contact from Outlook to SuiteCRM.
Enviroment:
Windows 10 Pro, Outlook 2016; plugin v3.0.5
SuiteCRM 7.8.5; PHP 7.1

apache error log:

[Tue Jun 20 15:45:41.224542 2017] [php7:notice] [pid 2240] [client 10.10.x.x:53989] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function SugarWebServiceImplv4::get_entry_list(), 8 passed in /path/SuiteCRM/service/core/REST/SugarRestJSON.php on line 91 and at least 9 expected in /path/SuiteCRM/service/v4/SugarWebServiceImplv4.php:250\nStack trace:\n#0 /path/SuiteCRM/service/core/REST/SugarRestJSON.php(91): SugarWebServiceImplv4->get_entry_list('5eutd7q9fvnb2ik...', 'Cases', '(cases.name LIK...', 'date_entered DE...', 0, Array, 1000, 0)\n#1 /path/SuiteCRM/service/core/SugarRestService.php(133): SugarRestJSON->serve()\n#2 /path/SuiteCRM/service/core/webservice.php(66): SugarRestService->serve()\n#3 /path/SuiteCRM/service/v4_1/rest.php(53): require_once('/path/S...')\n#4 {main}\n  thrown in /path/SuiteCRM/service/v4/SugarWebServiceImplv4.php on line 250

logs from suitecrmoutlook.log:

2017-06-20 15:09:17,828 | VSTA_Main | ERROR | Failed calling 'get_entry_list'
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:17,828 | VSTA_Main | ERROR | Failure when custom module included (2)
    Query was '(accounts.name LIKE 'mariusz') OR (accounts.id in (select eabr.bean_id from email_addr_bean_rel eabr INNER JOIN email_addresses ea on eabr.email_address_id = ea.id where eabr.bean_module = 'Accounts' and ea.email_address LIKE 'mariusz'))'
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
   w SuiteCRMClient.clsSuiteCRMHelper.GetEntryList(String module, String query, Int32 limit, String order_by, Int32 offset, Boolean GetDeleted, String[] fields)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.TryQuery(String searchText, String moduleName, List`1 fieldsToSeek)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:17,828 | VSTA_Main | ERROR | Failure when custom module included (3)
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
   w SuiteCRMClient.clsSuiteCRMHelper.GetEntryList(String module, String query, Int32 limit, String order_by, Int32 offset, Boolean GetDeleted, String[] fields)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.TryQuery(String searchText, String moduleName, List`1 fieldsToSeek)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.Search(String searchText)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:19,202 | VSTA_Main | WARN  | Tried calling 'get_entry_list' with parameter '{ session = ho5t1j04lmdg35f194306afbeh, module_name = Contacts, query = (contacts.first_name LIKE '%mariusz%' OR contacts.last_name LIKE '%mariusz%') OR (contacts.id in (select eabr.bean_id from email_addr_bean_rel eabr INNER JOIN email_addresses ea on eabr.email_address_id = ea.id where eabr.bean_module = 'Contacts' and ea.email_address LIKE '%mariusz%')), order_by = date_entered DESC, offset = 0, select_fields = System.String[], max_results = 1000, deleted = 0 }', timeout is 300000ms
2017-06-20 15:09:19,202 | VSTA_Main | ERROR | Failed calling 'get_entry_list'
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:19,202 | VSTA_Main | ERROR | Failure when custom module included (1)
    Query was '(contacts.first_name LIKE '%mariusz%' OR contacts.last_name LIKE '%mariusz%') OR (contacts.id in (select eabr.bean_id from email_addr_bean_rel eabr INNER JOIN email_addresses ea on eabr.email_address_id = ea.id where eabr.bean_module = 'Contacts' and ea.email_address LIKE '%mariusz%'))'
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
   w SuiteCRMClient.clsSuiteCRMHelper.GetEntryList(String module, String query, Int32 limit, String order_by, Int32 offset, Boolean GetDeleted, String[] fields)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.TryQuery(String searchText, String moduleName, List`1 fieldsToSeek)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:19,262 | VSTA_Main | WARN  | Tried calling 'get_entry_list' with parameter '{ session = ho5t1j04lmdg35f194306afbeh, module_name = Contacts, query = (contacts.first_name LIKE 'mariusz' OR contacts.last_name LIKE 'mariusz') OR (contacts.id in (select eabr.bean_id from email_addr_bean_rel eabr INNER JOIN email_addresses ea on eabr.email_address_id = ea.id where eabr.bean_module = 'Contacts' and ea.email_address LIKE 'mariusz')), order_by = date_entered DESC, offset = 0, select_fields = System.String[], max_results = 1000, deleted = 0 }', timeout is 300000ms
2017-06-20 15:09:19,262 | VSTA_Main | ERROR | Failed calling 'get_entry_list'
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:19,262 | VSTA_Main | ERROR | Failure when custom module included (2)
    Query was '(contacts.first_name LIKE 'mariusz' OR contacts.last_name LIKE 'mariusz') OR (contacts.id in (select eabr.bean_id from email_addr_bean_rel eabr INNER JOIN email_addresses ea on eabr.email_address_id = ea.id where eabr.bean_module = 'Contacts' and ea.email_address LIKE 'mariusz'))'
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
   w SuiteCRMClient.clsSuiteCRMHelper.GetEntryList(String module, String query, Int32 limit, String order_by, Int32 offset, Boolean GetDeleted, String[] fields)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.TryQuery(String searchText, String moduleName, List`1 fieldsToSeek)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079
2017-06-20 15:09:19,262 | VSTA_Main | ERROR | Failure when custom module included (3)
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
   w System.Net.HttpWebRequest.GetResponse()
   w SuiteCRMClient.CrmRestServer.GetResponseString(HttpWebRequest request)
   w SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String strMethod, Object objInput)
   w SuiteCRMClient.clsSuiteCRMHelper.GetEntryList(String module, String query, Int32 limit, String order_by, Int32 offset, Boolean GetDeleted, String[] fields)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.TryQuery(String searchText, String moduleName, List`1 fieldsToSeek)
   w SuiteCRMAddIn.Dialogs.ArchiveDialog.Search(String searchText)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233079

sCRM.png

Best,
Karol

  1. suitecrm member avatar

    SuiteCRM Provider Affiliate

    2 years ago

    Hi Karol,

    This is a known bug. There is a workaround suggested by paul2 here: https://store.suitecrm.com/support/SuiteCRM-official-outlook-plugin/436

    Add $singleSelect=false to the end of the function declaration for get_data_list on line 85 of SugarWebServiceUtilv4.php

    Let me know how you get on.

    • SuiteCRM Outlook Plugin Team
  2. karol.m member avatar

    karol.m

    2 years ago

    Hi,
    like argument in function:

    get_data_list(..... $singleSelect=false)
    

    **or in declaration: **

    {
     .....
    return $seed->process_.....);
     $singleSelect=false;
    }
    

    ??

    Best,
    Karol

  3. karol.m member avatar

    karol.m

    2 years ago

    Hi,
    I tried both scenarios, but the error is the same.
    Probably the bug is in the count of arguments which were sending to the function.


    Arguments from plugin:

    session = j6rq5ku81ao66lq7ht9gp8ji5o,
    module_name = Contacts,
    query = (contacts.first_name LIKE '%John.x@example.com%' OR contacts.last_name LIKE '%John.x@example.com%') OR (contacts.id in (select eabr.bean_id from email_addr_bean_rel eabr
                                    INNER JOIN email_addresses ea on eabr.email_address_id = ea.id where eabr.bean_module = 'Contacts' and ea.email_address LIKE '%John.x@example.com%')),
    order_by = date_entered DESC,
    offset = 0,
    select_fields = System.String[],
    max_results = 1000,
    deleted = 0 }',


    Arguments from function get_entry_list in SugarWebServiceImplv4.php

    function get_entry_list($session, $module_name, $query, $order_by, $offset, $select_fields, $link_name_to_fields_array, $max_results, $deleted, $favorites = false)

    Best,
    Karol

  4. suitecrm member avatar

    SuiteCRM Provider Affiliate

    2 years ago

    Hi Karol,

    The issue is with PHP 7.1 on the SuiteCRM side rather than the SuiteCRM Outlook. Recommend turning off the Fatals until the SuiteCRM is updated to resolve this.

    • SuiteCRM Outlook Plugin Team
  5. karol.m member avatar

    karol.m

    2 years ago

    Hi SuiteCRM,
    Do you have some guide or tip how to "turning off the Fatals" ?

    Best,
    Karol

    • suitecrm member avatar

      SuiteCRM Provider Affiliate

      2 years ago

      Hi Karol,

      To disable errors you are looking for error_reporting in php.ini. E_ERROR should be removed to disable fatal error reporting.

      SuiteCRM Outlook Plugin Team

    • karol.m member avatar

      karol.m

      2 years ago

      Hi SuiteCRM,
      Here you are my php config

      ./apache2/php.ini:error_reporting = ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_ERROR & ~E_WARNING & ~E_USER_ERROR & ~E_USER_WARNING & ~E_USER_NOTICE
      
      ./cli/php.ini:error_reporting =  ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_ERROR & ~E_WARNING & ~E_USER_ERROR & ~E_USER_WARNING & ~E_USER_NOTICE
      

      it's ok ? because nothing has changed :(

      Best,
      Karol

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...