Hi @art,
Sorry for the delay.
I’m glad you were able get it working.
The reference to public/legacy/custom/Extension/application/Ext/Include/<file>.php, was just to open it and check the machine name for the module. From what I’ve understood in your case the module name is PKG1_Staff.
That module name is the name that should be used on the code inside the public/legacy/custom/Extension/application/Ext/ModuleNameMap/<any_name>.php
like
$module_name_map = $module_name_map ?? [];
$module_name_map['PKG1_Staff'] = [
'frontend' => 'staff',
'core' => 'PKG1_Staff'
];
Now on the reason why is this needed.
-
As a matter of fact this should not be needed. This is caused as a part of the logic of the acl check that is being too strict, which causes custom module not to be recognized as valid modules if they are not defined on the
module_name_map. We are in the process of changing that. -
What is
module_name_map?
Module name map, is a map that maps from legacy module names to more “standard” names both on the front end and on the SuiteCRM 8 side backend. Though at the moment it is mostly used for the front end.
When you open the app and go to the accounts module the address is something like <your_instante>/#/accounts/ and not <your_instante>/#/Accounts/ or if you go to Quotes the address is <your_instante>/#/quotes/ and not not <your_instante>/#/AOS_Quotes/. This mapping between the legacy module name and the front end name is declare on the module_name_map.
You can find the core module_name_map at public/legacy/include/portability/module_name_map.php
And we allow to extend the module name map, use the legacy extension mechanism. Which is declared on public/legacy/ModuleInstall/extensions.php.
This extension setup is what allows us to add the file to public/legacy/custom/Extension/application/Ext/ModuleNameMap/<any_name>.php
Hope this helps make it a bit more clear.