When ever updating Field's or Formula's I constantly get "BAD SERVER" and in the logs it shows "uncaught exception" - i have my logs set to DEBUG mode and still am unable to determine what the cause is. I don't see anything the apache logs that are helpful either. It's so bad that I have to take a VM Snapshot before each small change.
This last time all I did specifically was update a formula for the Account's Entity, it flashed saying it was "unable to clear cache" and then started flashing "BAD SERVER" and this is the log below. CRM is Version 5.2.5 running on Ubuntu 14.04 with Apache2 and MySQL 5.6 (I did not yet get to install today's updated release to version 5.3.3)
Any help would be appreciated & thank you!
ESPOLOG 20180716
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: End workflow rule [5a396c0a7d1c49bc9]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: Start workflow rule [5abb9547584be9993]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: Condition result [] for workflow rule [5abb9547584be9993]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: End workflow rule [5abb9547584be9993]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: End workflow [afterRecordSaved] for Entity [Account, 5b1eabe4b70aa6330]. [] []
[2018-07-17 14:19:33] Espo.WARNING: E_WARNING: rmdir(data/cache/application): Directory not empty {"code":2,"message":"rmdir(data/cache/application): Directory not empty","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":529,"context":{"dirPaths":["data/cache/application"],"result":true,"dirPath":"data/cache/application"}} []
[2018-07-17 14:19:33] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => EntityManager [action] => formula ) , InputData: {"data":{"beforeSaveCustomScript":"urlgensow = string\\concatenate('http://crm.teamamericom.com/phpexcel/test4.php?accountid1=',id);\nifThenElse(entity\\is AttributeChanged('orderstatus'), orderstatusdt = datetime\\now());\nifThenElse(entity\\isAttributeC hanged('orderstatusi'), orderstatusdt = datetime\\now());\nifThenElse(entity\\isAttributeC hanged('orderstatusv'), orderstatusdt = datetime\\now());\nifThen(discountvideo == null && client == 'COMCAST',discountvideo = 0);\nifThen(discountvoice == null && client == 'COMCAST',discountvoice = 0);\nifThen(discountinternet == null && client == 'COMCAST',discountinternet = 0);\nifThen(ccblmrc == null && client == 'COMCAST',ccblmrc = 0);\nifThen(ccfflmrc == null && client == 'COMCAST',ccfflmrc = 0);\nifThen(ccmlmrc == null && client == 'COMCAST',ccmlmrc = 0);\nifThen(ccimrc == null && client == 'COMCAST',ccimrc = 0);\nifThen(ccbl == null && client == 'COMCAST',ccbl = 0);\nifThen(ccffl == null && client == 'COMCAST',ccffl = 0);\nifThen(ccml == null && client == 'COMCAST',ccml = 0);\nifThen(client == 'COMCAST', mrc = ((ccblmrc+ccfflmrc+ccmlmrc+ccimrc+ccvmrc)-(discountinternet+discountvideo+discountvoice)));\ nifThenElse(client == 'COMCAST' && term = '36 Mo', commission = ifThenElse(voice == 'New', (ccblmrc+ccfflmrc+ccmlmrc) - discountvoice,0) + ifThenElse(internet == 'New', ccimrc - discountinternet,0) + ifThenElse(video == 'New', ccvmrc - discountvideo,0),0);\nifThenElse(client == 'COMCAST' && term = '24 Mo', commission = ifThenElse(voice == 'New', (ccblmrc+ccfflmrc+ccmlmrc-discountvoice) * 0.5,0) + ifThenElse(internet == 'New', ccimrc - discountinternet * 0.5,0) + ifThenElse(video == 'New', ccvmrc - discountvideo * 0.5,0),0);"},"scope":"Account"} - Error while clearing cache [] []
[2018-07-17 14:19:33] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/EntityManager/action/formula [] []
[2018-07-17 14:19:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/espocrm/application/Espo/Core/Utils/Database/Orm/Converter.php","line":171,"context":{"entityDefs": 1,"ormMetadata":[]}} []
[2018-07-17 14:19:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/espocrm/application/Espo/Core/ORM/Repositories/RDB.php","line":129,"context":{"params":{"offset": 0,"limit":1,"whereClause":{"token":"d8ba0966c88292 76ae1855b14c264d8c"},"havingClause":[]},"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-07-17 14:19:34] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\DB\Mapper::select() must be an instance of Espo\ORM\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201" at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php line 105 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\DB\\Mapper::select() must be an instance of Espo\\ORM\\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201 at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php:105)"} []
[2018-07-17 14:19:34] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\DB\Mapper::select() must implement interface Espo\ORM\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201" at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php line 105 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\DB\\Mapper::select() must implement interface Espo\\ORM\\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201 at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php:105)"} []
the error just continue repeating from here ................. for 1000's of lines if i let it!
This last time all I did specifically was update a formula for the Account's Entity, it flashed saying it was "unable to clear cache" and then started flashing "BAD SERVER" and this is the log below. CRM is Version 5.2.5 running on Ubuntu 14.04 with Apache2 and MySQL 5.6 (I did not yet get to install today's updated release to version 5.3.3)
Any help would be appreciated & thank you!
ESPOLOG 20180716
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: End workflow rule [5a396c0a7d1c49bc9]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: Start workflow rule [5abb9547584be9993]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: Condition result [] for workflow rule [5abb9547584be9993]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: End workflow rule [5abb9547584be9993]. [] []
[2018-07-17 14:16:50] Espo.DEBUG: WorkflowManager: End workflow [afterRecordSaved] for Entity [Account, 5b1eabe4b70aa6330]. [] []
[2018-07-17 14:19:33] Espo.WARNING: E_WARNING: rmdir(data/cache/application): Directory not empty {"code":2,"message":"rmdir(data/cache/application): Directory not empty","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":529,"context":{"dirPaths":["data/cache/application"],"result":true,"dirPath":"data/cache/application"}} []
[2018-07-17 14:19:33] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => EntityManager [action] => formula ) , InputData: {"data":{"beforeSaveCustomScript":"urlgensow = string\\concatenate('http://crm.teamamericom.com/phpexcel/test4.php?accountid1=',id);\nifThenElse(entity\\is AttributeChanged('orderstatus'), orderstatusdt = datetime\\now());\nifThenElse(entity\\isAttributeC hanged('orderstatusi'), orderstatusdt = datetime\\now());\nifThenElse(entity\\isAttributeC hanged('orderstatusv'), orderstatusdt = datetime\\now());\nifThen(discountvideo == null && client == 'COMCAST',discountvideo = 0);\nifThen(discountvoice == null && client == 'COMCAST',discountvoice = 0);\nifThen(discountinternet == null && client == 'COMCAST',discountinternet = 0);\nifThen(ccblmrc == null && client == 'COMCAST',ccblmrc = 0);\nifThen(ccfflmrc == null && client == 'COMCAST',ccfflmrc = 0);\nifThen(ccmlmrc == null && client == 'COMCAST',ccmlmrc = 0);\nifThen(ccimrc == null && client == 'COMCAST',ccimrc = 0);\nifThen(ccbl == null && client == 'COMCAST',ccbl = 0);\nifThen(ccffl == null && client == 'COMCAST',ccffl = 0);\nifThen(ccml == null && client == 'COMCAST',ccml = 0);\nifThen(client == 'COMCAST', mrc = ((ccblmrc+ccfflmrc+ccmlmrc+ccimrc+ccvmrc)-(discountinternet+discountvideo+discountvoice)));\ nifThenElse(client == 'COMCAST' && term = '36 Mo', commission = ifThenElse(voice == 'New', (ccblmrc+ccfflmrc+ccmlmrc) - discountvoice,0) + ifThenElse(internet == 'New', ccimrc - discountinternet,0) + ifThenElse(video == 'New', ccvmrc - discountvideo,0),0);\nifThenElse(client == 'COMCAST' && term = '24 Mo', commission = ifThenElse(voice == 'New', (ccblmrc+ccfflmrc+ccmlmrc-discountvoice) * 0.5,0) + ifThenElse(internet == 'New', ccimrc - discountinternet * 0.5,0) + ifThenElse(video == 'New', ccvmrc - discountvideo * 0.5,0),0);"},"scope":"Account"} - Error while clearing cache [] []
[2018-07-17 14:19:33] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/EntityManager/action/formula [] []
[2018-07-17 14:19:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/espocrm/application/Espo/Core/Utils/Database/Orm/Converter.php","line":171,"context":{"entityDefs": 1,"ormMetadata":[]}} []
[2018-07-17 14:19:34] Espo.WARNING: E_WARNING: Invalid argument supplied for foreach() {"code":2,"message":"Invalid argument supplied for foreach()","file":"/var/www/espocrm/application/Espo/Core/ORM/Repositories/RDB.php","line":129,"context":{"params":{"offset": 0,"limit":1,"whereClause":{"token":"d8ba0966c88292 76ae1855b14c264d8c"},"havingClause":[]},"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-07-17 14:19:34] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\DB\Mapper::select() must be an instance of Espo\ORM\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201" at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php line 105 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\DB\\Mapper::select() must be an instance of Espo\\ORM\\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201 at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php:105)"} []
[2018-07-17 14:19:34] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\DB\Mapper::select() must implement interface Espo\ORM\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201" at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php line 105 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\DB\\Mapper::select() must implement interface Espo\\ORM\\IEntity, null given, called in /var/www/espocrm/application/Espo/ORM/Repositories/RDB.php on line 201 at /var/www/espocrm/application/Espo/ORM/DB/Mapper.php:105)"} []
the error just continue repeating from here ................. for 1000's of lines if i let it!
Comment