Skip to content

ModuleBuilder adds all application labels in new module creation #10646

Open
@SinergiaCRM

Description

@SinergiaCRM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: StudioIssues & PRs related to all things regarding studio & module builderPriority:ImportantIssues & PRs that are important; broken functions, errors - there are workaroundsSeverity: MajorSignificant impact/severe disruptionType: BugBugs within the core SuiteCRM codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions