Module loader: Making a mistake in language files the process finishes but install errors. #5320

Open
opened 2026-02-20 16:59:36 -05:00 by deekerman · 2 comments
Owner

Originally created by @jobst on GitHub (Apr 25, 2025).

Issue

I am creating a module, when using the module loader to install this with errors in the language files the process happily finishes and no errors are reported but the navigation menu item of the main module/bean does NOT show up.

Yes I made a mistake (shown below), but the Module Loader should pick this up and tell me off.

Here's the manifest with lots of stuff chopped:

$manifest = array (
  'name' => 'MyModule',
  'description' => 'module to show the loading error', 
  'version' => 1.0,
  'author' => 'Jobst Schmalenbach',
  'is_uninstallable' => true,
  'published_date' => '2025-04-30 23:23:59',
  'type' => 'module',
  'remove_tables' => 'prompt',
);
 'id' => 'MyModule',
  'beans' => 
    array (
      0 => 
        array (
          'module' => 'MyModule',
          'class' => 'MyClass',
          'path' => 'modules/MyModule/MyClass.php',
          'tab' => true,
        ),
    ),
  'layoutdefs' => 
    array (
    ),
  'relationships' => 
    array (
    ),
  'language' => 
    array (
      0 => 
        array (
          'from' => '<basepath>/SugarModules/language/application/en_us.MyModule.php',
          'to_module' => 'application',
          'language' => 'en_us',
        ),
      2 => 
        array (
          'from' => '<basepath>/SugarModules/language/application/en_us.MyModuleAdmin.php',
          'to_module' => 'Administration',
          'language' => 'en_us',
        ),
   ),
  'scheduledefs' =>
    array(
      0 =>
        array(
          'from' => '<basepath>/extensions/daily.php',
        ),
      1 =>
        array(
          'from' => '<basepath>/extensions/hourly.php',
        ),
    ),
  'administration' =>
    array (
      0 => array (
        'from' => '<basepath>/admin/MyModuleAdminMenu.php'
      ),
    ),
);

Here are the two errors, I basically swapped the contents of the module application and admin language files:

In the admin file I had:

<?php 
$app_list_strings['moduleList']['CalDavSync'] = 'CalDavSync';

In the module application file I had

<?php 
$mod_strings['LBL_CALDAVSYNC_ADMIN_PANEL'] = 'CalDavSync Administration Panel';

The install goes through happily, no warning in the PHP (php errors setting is not limited).
The menu of the module never shows up.

As soon as I fixed hte language files I had no issues.
I know it was my error, but the error reporting system of the module loader is not good enough.

Took me hours to find ...

Possible Fix

No idea, sorry.

Steps to Reproduce the Issue

1.upload and install a module with errors in language files via Module Loader
2.process finishes
3.no errors reported
4.Menu item of the module (the main bean) missing

Context

I spend quite a few hours on this to figure out why this happened.
I basically started with a file from the module builder then added my stuff.

Even then I had trouble to spot it because the language files were installed in the tree with no errors reported.

I am a long time user/admin/developer of sugar/suitecrm, this really baffled me.

Version

7.14.6

What browser are you currently using?

Firefox

Browser Version

N/A, it's NOT related to the browser

Environment Information

mysql 8.0.41, php 8.2.28

Operating System and Version

AlmaLinux 8.X (not related to this)

Originally created by @jobst on GitHub (Apr 25, 2025). ### Issue I am creating a module, when using the module loader to install this with errors in the language files the process happily finishes and no errors are reported but the navigation menu item of the main module/bean does NOT show up. Yes I made a mistake (shown below), but the Module Loader should pick this up and tell me off. Here's the manifest with lots of stuff chopped: ``` $manifest = array ( 'name' => 'MyModule', 'description' => 'module to show the loading error', 'version' => 1.0, 'author' => 'Jobst Schmalenbach', 'is_uninstallable' => true, 'published_date' => '2025-04-30 23:23:59', 'type' => 'module', 'remove_tables' => 'prompt', ); 'id' => 'MyModule', 'beans' => array ( 0 => array ( 'module' => 'MyModule', 'class' => 'MyClass', 'path' => 'modules/MyModule/MyClass.php', 'tab' => true, ), ), 'layoutdefs' => array ( ), 'relationships' => array ( ), 'language' => array ( 0 => array ( 'from' => '<basepath>/SugarModules/language/application/en_us.MyModule.php', 'to_module' => 'application', 'language' => 'en_us', ), 2 => array ( 'from' => '<basepath>/SugarModules/language/application/en_us.MyModuleAdmin.php', 'to_module' => 'Administration', 'language' => 'en_us', ), ), 'scheduledefs' => array( 0 => array( 'from' => '<basepath>/extensions/daily.php', ), 1 => array( 'from' => '<basepath>/extensions/hourly.php', ), ), 'administration' => array ( 0 => array ( 'from' => '<basepath>/admin/MyModuleAdminMenu.php' ), ), ); ``` Here are the two errors, I basically swapped the contents of the module application and admin language files: In the admin file I had: ``` <?php $app_list_strings['moduleList']['CalDavSync'] = 'CalDavSync'; ``` In the module application file I had ``` <?php $mod_strings['LBL_CALDAVSYNC_ADMIN_PANEL'] = 'CalDavSync Administration Panel'; ``` The install goes through happily, no warning in the PHP (php errors setting is not limited). The menu of the module never shows up. As soon as I fixed hte language files I had no issues. I know it was my error, but the error reporting system of the module loader is not good enough. Took me hours to find ... ### Possible Fix No idea, sorry. ### Steps to Reproduce the Issue ```bash 1.upload and install a module with errors in language files via Module Loader 2.process finishes 3.no errors reported 4.Menu item of the module (the main bean) missing ``` ### Context I spend quite a few hours on this to figure out why this happened. I basically started with a file from the module builder then added my stuff. Even then I had trouble to spot it because the language files were installed in the tree with no errors reported. I am a long time user/admin/developer of sugar/suitecrm, this really baffled me. ### Version 7.14.6 ### What browser are you currently using? Firefox ### Browser Version N/A, it's NOT related to the browser ### Environment Information mysql 8.0.41, php 8.2.28 ### Operating System and Version AlmaLinux 8.X (not related to this)
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
Author
Owner

@jobst commented on GitHub (May 8, 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

No SuiteBot, it's unrelated.

@jobst commented on GitHub (May 8, 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 No SuiteBot, it's unrelated.
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#5320
No description provided.