if you set it in custom and file is valid, you can not lose this functionality
B2C mode and two addresses
Collapse
X
-
I just ran the upgrade from 5.0.5 to 5.1.1 and got "clearing cache errors" again.
I had to remove the following customization from Opportunity.json (See attachments) just to get the upgrade to work.
This customization seems to cause "cache clearing errors" everywhere in the system even when adding fields or adding values to enum fields.
This customization should not do that right?
"serviceaddress": {
"type": "address",
"view": "custom:views/opportunity/fields/service-address"
},
Error From Logs:
[2018-03-18 01:36:40] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => Admin [action] => runUpgrade ) , InputData: {"id":"5aadc29d04d58"} - Error while clearing cache [] []
[2018-03-18 01:36:40] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/Admin/action/runUpgrade [] []
[2018-03-18 01:36:42] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74" at /var/www/espocrm/application/Espo/ORM/EntityManager.php line 184 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74 at /var/www/espocrm/application/Espo/ORM/EntityManager.php:184)"} []
[2018-03-18 01:36:42] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74" at /var/www/espocrm/application/Espo/ORM/EntityManager.php line 184 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74 at /var/www/espocrm/application/Espo/ORM/EntityManager.php:184)"} []
[2018-03-18 01:36:42] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74" at /var/www/espocrm/application/Espo/ORM/EntityManager.php line 184 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74 at /var/www/espocrm/application/Espo/ORM/EntityManager.php:184)"} []
[2018-03-18 01:36:54] Espo.WARNING: E_WARNING: unlink(data/cache/templates/report-sending-body-grid-2-en_US.php): Permission denied {"code":2,"message":"unlink(data/cache/templates/report-sending-body-grid-2-en_US.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/templates","removeWithDir":true,"fileList":["report-sending-body-grid-2-en_US.php","report-sending-body-list-en_US.php","report-sending-subject-grid-2-en_US.php","report-sending-subject-list-en_US.php"],"result":true,"file":"report-sending-body-grid-2-en_US.php","fullPath":"data/cache/templates/report-sending-body-grid-2-en_US.php"}} []
[2018-03-18 01:36:54] Espo.WARNING: E_WARNING: unlink(data/cache/templates/report-sending-body-list-en_US.php): Permission denied {"code":2,"message":"unlink(data/cache/templates/report-sending-body-list-en_US.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/templates","removeWithDir":true,"fileList":["report-sending-body-grid-2-en_US.php","report-sending-body-list-en_US.php","report-sending-subject-grid-2-en_US.php","report-sending-subject-list-en_US.php"],"result":0,"file":"report-sending-body-list-en_US.php","fullPath":"data/cache/templates/report-sending-body-list-en_US.php"}} []
[2018-03-18 01:36:54] Espo.WARNING: E_WARNING: unlink(data/cache/templates/report-sending-subject-grid-2-en_US.php): Permission denied {"code":2,"message":"unlink(data/cache/templates/report-sending-subject-grid-2-en_US.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/templates","removeWithDir":true,"fileList":["report-sending-body-grid-2-en_US.php","report-sending-body-list-en_US.php","report-sending-subject-grid-2-en_US.php","report-sending-subject-list-en_US.php"],"result":0,"file":"report-sending-subject-grid-2-en_US.php","fullPath":"data/cache/templates/report-sending-subject-grid-2-en_US.php"}} []
[2018-03-18 01:36:54] Espo.WARNING: E_WARNING: unlink(data/cache/templates/report-sending-subject-list-en_US.php): Permission denied {"code":2,"message":"unlink(data/cache/templates/report-sending-subject-list-en_US.php): Permission denied","file":"/var/www/espocrm/application/Espo/Core/Utils/File/Manager.php","line":587,"context":{"dirPath":"data/cache/templates","removeWithDir":true,"fileList":["report-sending-body-grid-2-en_US.php","report-sending-body-list-en_US.php","report-sending-subject-grid-2-en_US.php","report-sending-subject-list-en_US.php"],"result":0,"file":"report-sending-subject-list-en_US.php","fullPath":"data/cache/templates/report-sending-subject-list-en_US.php"}} []
[2018-03-18 01:36:54] Espo.ERROR: API [POST]:/Admin/clearCache, Params:Array ( ) , InputData: - Error while clearing cache [] []
[2018-03-18 01:36:54] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/Admin/clearCache [] []
[2018-03-18 01:39:15] Espo.ERROR: Uncaught Exception TypeError: "Argument 1 passed to Espo\ORM\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74" at /var/www/espocrm/application/Espo/ORM/EntityManager.php line 184 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Espo\\ORM\\EntityManager::setMetadata() must be of the type array, integer given, called in /var/www/espocrm/application/Espo/ORM/EntityManager.php on line 74 at /var/www/espocrm/application/Espo/ORM/EntityManager.php:184)"} []
[2018-03-18 01:39:15] 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":[],"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-03-18 01:39:15] 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 103 {"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:103)"} []Attached FilesLast edited by khopper; 03-18-2018, 02:23 AM.Comment
-
-
It's sporadic and it let me rebuild, however I was able to get this for you.
The logs below (attached) in conjunction with the screen shot (attached). As long as the permissions are proper i should not be getting the clearing cache error right?
I kept running across the clearing cache error after almost immediately applying them and even after. Obviously the log date time is UTC while my system time is ETC.Attached Files1 PhotoComment
-
I confirmed the permissions, I even adjusted the crontab to run under user "www-data"
I don't see where in the logs it mentions an Entity I not have. No new Entities have been created.
The below log was a simple change - adding values to an ENUM field. I did a rebuild before attempting just fine.
[2018-03-22 14:54:01] Espo.DEBUG: WorkflowManager: Start workflow [afterRecordSaved] for Entity [Opportunity, 5ab3c38904ffb7116]. [] []
[2018-03-22 14:54:01] Espo.DEBUG: WorkflowManager: Start workflow rule [59f9dbda4c81ca9cf]. [] []
[2018-03-22 14:54:01] Espo.DEBUG: WorkflowManager: Condition result [] for workflow rule [59f9dbda4c81ca9cf]. [] []
[2018-03-22 14:54:01] Espo.DEBUG: WorkflowManager: End workflow rule [59f9dbda4c81ca9cf]. [] []
[2018-03-22 14:54:01] Espo.DEBUG: WorkflowManager: End workflow [afterRecordSaved] for Entity [Opportunity, 5ab3c38904ffb7116]. [] []
[2018-03-22 14:54:08] 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":[],"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-03-22 14:54:08] 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":[],"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-03-22 14:54:08] 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 103 {"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:103)"} []
[2018-03-22 14:54:08] 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":[],"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-03-22 14:54:08] 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":[],"entityType":"AuthToken","metadata":"[object] (Espo\\Core\\Utils\\Metadata: {})","defs":1}} []
[2018-03-22 14:54:08] 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 103 {"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:103)"} []
[2018-03-22 14:54:08] 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 103 {"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:103)"} []
[2018-03-22 14:54:08] 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 103 {"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:103)"} []
[2018-03-22 14:55:27] Espo.DEBUG: Schema\Converter - Start: building schema [] []
[2018-03-22 14:55:27] Espo.DEBUG: DBAL: Table [entity_team] exists. [] []
[2018-03-22 14:55:27] Espo.DEBUG: Schema\Converter - End: building schema [] []
[2018-03-22 14:58:40] 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-03-22 14:58:40] Espo.ERROR: API [PATCH]:/Admin/fieldManager/:scope/:name, Params:Array ( [scope] => Account [name] => orderstatusi ) , InputData: {"name":"orderstatusi","type":"enum","required":fa lse,"options":["","N/A","Add more options","Rescheduled","Scheduled","Cancelled - Dead"],"isSorted":false,"audited":false,"readOnly":false ,"tooltip":false,"isCustom":true,"dynamicLogicVisi ble":null,"dynamicLogicRequired":null,"dynamicLogi cReadOnly":null,"dynamicLogicOptions":null,"transl atedOptions":{"":"","N/A":"N/A","Add more options":"Add more options","Rescheduled":"Rescheduled","Scheduled":" Scheduled","Cancelled - Dead":"Cancelled - Dead"},"default":""} - Error while clearing cache [] []
[2018-03-22 14:58:40] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/Admin/fieldManager/Account/orderstatusi [] []
[2018-03-22 14:58:51] Espo.DEBUG: Schema\Converter - Start: building schema [] []
[2018-03-22 14:58:51] Espo.DEBUG: Rebuild Database for entities: [Account] with dependent entities: [Account, EmailAddress, PhoneNumber, QuoteItem, Quote, Team, InboundEmail, Email, EmailAccount, EmailFolder, User, Attachment, Report, ReportCategory, TargetList, Lead, GoogleContactsPair, VoipMessage, Document, DocumentFolder, Contact, Task, CampaignLogRecord, EmailQueueItem, MassEmail, Campaign, CampaignTrackingUrl, Opportunity, OpportunityItem, Product, ProductCategory, ProductBrand, Call, GoogleCalendar, Meeting, GoogleCalendarUser, GoogleCalendarRecurrentEvent, EmailTemplate, Case, KnowledgeBaseArticle, KnowledgeBaseCategory, Portal, Note, PortalRole, Preferences, Role, EmailFilter, ShippingProvider, Tax] [] []
[2018-03-22 14:58:52] Espo.DEBUG: DBAL: Table [entity_team] exists. [] []
[2018-03-22 14:58:52] Espo.DEBUG: Schema\Converter - End: building schema [] []Comment
Comment