Elasticsearch index fails on modified Cases module #3505

Closed
opened 2026-02-20 16:06:14 -05:00 by deekerman · 3 comments
Owner

Originally created by @vladaman on GitHub (Jan 16, 2019).

Related to SuiteCRM 7.11.0 with Elasticsearch enabled.

We have modified Cases module which likely causes the indexing to crash.

vendor/bin/robo elastic:index

I get following error:

vendor/bin/robo elastic:index
[=][20:45:30] Starting indexing procedures
[@][20:45:30] Indexing is performed using JsonSerializerDocumentifier
[@][20:45:30] Reading lock file cache/ElasticSearchIndexer.lock
[@][20:45:30] Lock file not found
[@][20:45:30] A full indexing will be performed
[@][20:45:30] Removed index 'main'
[@][20:45:30] Loading mapping file /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/defaultParams.yml
[@][20:45:30] Created new index 'main'
[@][20:45:31] Indexing module Accounts...
[@][20:45:34] Indexed 10/10 Accounts
[@][20:45:34] Indexing module Calls...
[@][20:45:34] Indexed 12/12 Calls
PHP Fatal error:  Uncaught Error: Call to a member function getJoin() on null in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php:387
Stack trace:
#0 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(3814): Link2->getJoin(Array, true)
#1 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(5165): SugarBean->create_new_list_query('', '', Array, Array, 0)
#2 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(218): SugarBean->get_full_list('', '', false, 0)
#3 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(134): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->indexModule('Cases')
#4 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(581): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->index()
#5 /var/www/crm/SuiteCRM-7.11.0/lib/Robo/Plugin/Commands/ElasticSearchCommands.php(121): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer::repairElasticsearchIndex(1, 0)
#6 [internal function]: SuiteCRM\Robo\Plugin\Commands\ElasticSearchCommands->el in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php on line 390
ERROR: Uncaught Error: Call to a member function getJoin() on null in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php:390
Stack trace:
#0 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(3814): Link2->getJoin(Array, true)
#1 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(5165): SugarBean->create_new_list_query('', '', Array, Array, 0)
#2 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(218): SugarBean->get_full_list('', '', false, 0)
#3 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(134): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->indexModule('Cases')
#4 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(581): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->index()
#5 /var/www/crm/SuiteCRM-7.11.0/lib/Robo/Plugin/Commands/ElasticSearchCommands.php(121): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer::repairElasticsearchIndex(1, 0)
#6 [internal function]: SuiteCRM\Robo\Plugin\Commands\ElasticSearchCommands->el 
in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php:390
Originally created by @vladaman on GitHub (Jan 16, 2019). Related to SuiteCRM 7.11.0 with Elasticsearch enabled. We have modified Cases module which likely causes the indexing to crash. ``` vendor/bin/robo elastic:index ``` I get following error: ``` vendor/bin/robo elastic:index [=][20:45:30] Starting indexing procedures [@][20:45:30] Indexing is performed using JsonSerializerDocumentifier [@][20:45:30] Reading lock file cache/ElasticSearchIndexer.lock [@][20:45:30] Lock file not found [@][20:45:30] A full indexing will be performed [@][20:45:30] Removed index 'main' [@][20:45:30] Loading mapping file /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/defaultParams.yml [@][20:45:30] Created new index 'main' [@][20:45:31] Indexing module Accounts... [@][20:45:34] Indexed 10/10 Accounts [@][20:45:34] Indexing module Calls... [@][20:45:34] Indexed 12/12 Calls PHP Fatal error: Uncaught Error: Call to a member function getJoin() on null in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php:387 Stack trace: #0 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(3814): Link2->getJoin(Array, true) #1 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(5165): SugarBean->create_new_list_query('', '', Array, Array, 0) #2 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(218): SugarBean->get_full_list('', '', false, 0) #3 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(134): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->indexModule('Cases') #4 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(581): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->index() #5 /var/www/crm/SuiteCRM-7.11.0/lib/Robo/Plugin/Commands/ElasticSearchCommands.php(121): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer::repairElasticsearchIndex(1, 0) #6 [internal function]: SuiteCRM\Robo\Plugin\Commands\ElasticSearchCommands->el in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php on line 390 ERROR: Uncaught Error: Call to a member function getJoin() on null in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php:390 Stack trace: #0 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(3814): Link2->getJoin(Array, true) #1 /var/www/crm/SuiteCRM-7.11.0/data/SugarBean.php(5165): SugarBean->create_new_list_query('', '', Array, Array, 0) #2 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(218): SugarBean->get_full_list('', '', false, 0) #3 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(134): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->indexModule('Cases') #4 /var/www/crm/SuiteCRM-7.11.0/lib/Search/ElasticSearch/ElasticSearchIndexer.php(581): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer->index() #5 /var/www/crm/SuiteCRM-7.11.0/lib/Robo/Plugin/Commands/ElasticSearchCommands.php(121): SuiteCRM\Search\ElasticSearch\ElasticSearchIndexer::repairElasticsearchIndex(1, 0) #6 [internal function]: SuiteCRM\Robo\Plugin\Commands\ElasticSearchCommands->el in /var/www/crm/SuiteCRM-7.11.0/data/Link2.php:390 ```
Author
Owner

@2xaronl commented on GitHub (Dec 5, 2022):

@vladaman Did you ever figure out a workaround for this? I've got some custom fields and relationships on my Cases module and the Elasticsearch indexing won't index it.

@2xaronl commented on GitHub (Dec 5, 2022): @vladaman Did you ever figure out a workaround for this? I've got some custom fields and relationships on my Cases module and the Elasticsearch indexing won't index it.
Author
Owner

@vladaman commented on GitHub (Dec 7, 2022):

@2xaronl not we did not find solution. We moved away from SuiteCRM -> Elasticsearch integration since the search results were very poor.

@vladaman commented on GitHub (Dec 7, 2022): @2xaronl not we did not find solution. We moved away from SuiteCRM -> Elasticsearch integration since the search results were very poor.
Author
Owner

@johnM2401 commented on GitHub (Apr 4, 2025):

Hey!

Thank you for raising this issue.

I've given this a try on 7.14.6 with elasticsearch 7, and I have not been able to replicate this issue.

I've added custom Viewdefs, Fields and Relationships for the Cases module, and this appears to complete indexing.

I'm going to close this issue off for now, but if you're still seeing this in the latest releases please don't hesitate to get in touch.
Or if you have any more information on what type of changes causes this issue, please let us know and we'd be happy to reinvestigate.

Thank you for your contributions to the project!

@johnM2401 commented on GitHub (Apr 4, 2025): Hey! Thank you for raising this issue. I've given this a try on 7.14.6 with elasticsearch 7, and I have not been able to replicate this issue. I've added custom Viewdefs, Fields and Relationships for the Cases module, and this appears to complete indexing. I'm going to close this issue off for now, but if you're still seeing this in the latest releases please don't hesitate to get in touch. Or if you have any more information on what type of changes causes this issue, please let us know and we'd be happy to reinvestigate. Thank you for your contributions to the project!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#3505
No description provided.