SuiteCRM Upgrade patches not including new elasticsearch logic hooks. #4782

Open
opened 2026-02-20 16:23:51 -05:00 by deekerman · 1 comment
Owner

Originally created by @ojs87 on GitHub (Jun 2, 2022).

Issue

When upgrading from, for example, 7.10.18 to 7.12.5, elastic search after_save and after_delete logic hooks are not added to the custom/modules/logic_hooks.php file, as they would be on a fresh install of suite 7.12.5.

Expected Behavior

The upgrade should include the logic hooks so when elastic search is enabled, saving a change to an indexed module will trigger a reindex.

Actual Behavior

Only the scheduled task or robo commands will reindex changes.

Possible Fix

Possibly add the install_es(install/suite_install/suite_install.php) or installESHooks(install/suite_install/Search.php) functions into the upgrade packages of suite versions before elastic search was added. Not sure how this is done with upgrade packages.

github.com/salesagility/SuiteCRM@51933421f7 link to the commit for installing the hooks

Steps to Reproduce

1.Start with a Suite v7.10.18 install
2.Use the upgrade wizard to upgrade to 7.12.5
3.build an elastic search server and enable elastic search in SuiteCRM, run a full index.
4.Ensure the elastic search scheduled task is not active so it does not run before step 5
5.Make a change to a record in any module and attempt to search for that change. The change should not appear in search results

Context

Upgrades from older Suite versions(pre elastic search) are not including the logic hooks so elastic search full functionality is not available.

Your Environment

  • SuiteCRM Version used: 7.10.18
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox v100.0.2
  • Environment name and version (e.g. MySQL, PHP 7):PHP 7.4
  • Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.04.4 LTS
Originally created by @ojs87 on GitHub (Jun 2, 2022). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> <!--- Please be aware that as of the 31st January 2022 we no longer support 7.10.x. New issues referring to 7.10.x will only be valid if applicable to 7.12.x and above. If your issue is still applicable in 7.12.x, please create the issue following the template below --> #### Issue <!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug --> <!--- Ensure that all code ``` is surrounded ``` by triple back quotes. This can also be done over multiple lines --> When upgrading from, for example, 7.10.18 to 7.12.5, elastic search after_save and after_delete logic hooks are not added to the custom/modules/logic_hooks.php file, as they would be on a fresh install of suite 7.12.5. #### Expected Behavior The upgrade should include the logic hooks so when elastic search is enabled, saving a change to an indexed module will trigger a reindex. #### Actual Behavior Only the scheduled task or robo commands will reindex changes. #### Possible Fix Possibly add the install_es(install/suite_install/suite_install.php) or installESHooks(install/suite_install/Search.php) functions into the upgrade packages of suite versions before elastic search was added. Not sure how this is done with upgrade packages. https://github.com/salesagility/SuiteCRM/commit/51933421f74eb06598185bb742d6d6f42d2e257d link to the commit for installing the hooks #### Steps to Reproduce 1.Start with a Suite v7.10.18 install 2.Use the upgrade wizard to upgrade to 7.12.5 3.build an elastic search server and enable elastic search in SuiteCRM, run a full index. 4.Ensure the elastic search scheduled task is not active so it does not run before step 5 5.Make a change to a record in any module and attempt to search for that change. The change should not appear in search results #### Context Upgrades from older Suite versions(pre elastic search) are not including the logic hooks so elastic search full functionality is not available. #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.10.18 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox v100.0.2 * Environment name and version (e.g. MySQL, PHP 7):PHP 7.4 * Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.04.4 LTS
Author
Owner

@SuiteBot commented on GitHub (Apr 7, 2023):

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/elasticsearch-not-working-on-suitecrm-version-version-7-12-2/88677/2

@SuiteBot commented on GitHub (Apr 7, 2023): This issue has been mentioned on **SuiteCRM**. There might be relevant details there: https://community.suitecrm.com/t/elasticsearch-not-working-on-suitecrm-version-version-7-12-2/88677/2
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#4782
No description provided.