when trying to create or update a user … getting exceptions?
if (ElasticSearchIndexer::isEnabled() === false) {
throw new SearchException(
'Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration.',
SearchException::ES_DISABLED
);
}
resulting in
Mon Jan 21 16:33:26 2019 [3856][1][FATAL] [ERROR] Failed to index bean to index
Mon Jan 21 16:33:26 2019 [3856][1][FATAL] [ERROR] SuiteCRM\Search\Exceptions\SearchException: Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration. in C:\inetpub\wwwroot\watxtreme.crm\lib\Search\ElasticSearch\ElasticSearchHooks.php:121
I have the same problem about elasticsearch logs. The problem is when saving a bean, elasticsearch hook is called even if it is disabled by system settings. The result is many lines of annoying and useless messages those make the log file dirty… to solve, I commented these lines out in lib/Search/ElasticSearch/ElasticSearchHooks.php
// $logger = new SuiteLogger();
// $logger->error($message);
// $logger->error($exception);
I know this way isn’t upgrade safe, but I cannot work it out another way.
I have taken a look of your workaroud. As said in the post you linked, the goal should be avoid to call elasticsearch if disabled. I have tried to override /include/utils/LogicHook.php with custom code but without success. That file is included in include/entryPoint.php and its methods are called by data/SugarBean.php. I think both are unoverrideable. I’ll keep trying.