ModuleBuilder adds all application labels in new module creation #5309

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

Originally created by @SinergiaCRM on GitHub (Mar 12, 2025).

Issue

When a package/module is created via ModuleBuilder, all instance application labels are incorrectly added in the package application language path.

This might provoque an inconsistency with other labels when the package is deployed.

Example:

Image

This problem is even worse when working with multi-language instances.

Possible Fix

This bug was introduced with the Rector changes in this commit: b966550ea57bfc68926258d6e32d0e8a1416a798.

It is incorrectly adding all app_list_strings to the package application strings:
MBLanguage.php (lines 97-104).

It seems that the variable $app_list_strings has always been empty, and the system was functioning just fine. However, this might have been an unnoticed bug until now.

Since we are unsure about the purpose of that condition, we have decided, for now, to simply remove line 86. This is effectively the same as removing the entire function, as it is currently doing nothing. Therefore, the loadAppListStrings function should be properly analyzed to assess its necessity.

Steps to Reproduce the Issue

1.Create a new Package
2.Add a new basic module and save it
3.Check in custom/modulesbuilder/packages/.../application/language that the file has all application labels.
4. After deploy, in a multi-language environment, many core labels are overriden.

Context

We consider this as an critical issue.

Version

7.14.6

What browser are you currently using?

Chrome

Browser Version

No response

Environment Information

PHP 8.3 and 8.4

Operating System and Version

Ubuntu 23.10

Originally created by @SinergiaCRM on GitHub (Mar 12, 2025). ### Issue When a package/module is created via ModuleBuilder, all instance application labels are incorrectly added in the package application language path. This might provoque an inconsistency with other labels when the package is deployed. Example: ![Image](https://github.com/user-attachments/assets/0e7227a5-0338-4df0-9ba2-fb89d00e2119) This problem is even worse when working with multi-language instances. ### Possible Fix This bug was introduced with the Rector changes in this commit: [b966550ea57bfc68926258d6e32d0e8a1416a798](https://github.com/salesagility/SuiteCRM/commit/b966550ea57bfc68926258d6e32d0e8a1416a798). It is incorrectly adding all app_list_strings to the package application strings: [MBLanguage.php (lines 97-104)](https://github.com/salesagility/SuiteCRM/blob/a69b8fdce5e70d490ddd8f91f16395ee426b0e01/modules/ModuleBuilder/MB/MBLanguage.php#L97-L104). It seems that the variable `$app_list_strings` has always been empty, and the system was functioning just fine. However, this might have been an unnoticed bug until now. Since we are unsure about the purpose of that condition, we have decided, for now, to simply remove line 86. This is effectively the same as removing the entire function, as it is currently doing nothing. Therefore, the `loadAppListStrings` function should be properly analyzed to assess its necessity. ### Steps to Reproduce the Issue ```bash 1.Create a new Package 2.Add a new basic module and save it 3.Check in custom/modulesbuilder/packages/.../application/language that the file has all application labels. 4. After deploy, in a multi-language environment, many core labels are overriden. ``` ### Context We consider this as an critical issue. ### Version 7.14.6 ### What browser are you currently using? Chrome ### Browser Version _No response_ ### Environment Information PHP 8.3 and 8.4 ### Operating System and Version Ubuntu 23.10
Author
Owner

@SuiteBot commented on GitHub (May 7, 2025):

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

https://community.suitecrm.com/t/can-not-see-new-custom-module-in-the-navbar-menu/99252/7

@SuiteBot commented on GitHub (May 7, 2025): This issue has been mentioned on **SuiteCRM**. There might be relevant details there: https://community.suitecrm.com/t/can-not-see-new-custom-module-in-the-navbar-menu/99252/7
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#5309
No description provided.