Suite8 - ModuleNameMapper for custom modules

Hi,

Is there any guidance available on how to map custom modules to the front end?

Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'Site_Site' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'PlApp_PlanningApplications' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'CA_BuildingRegulations' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'Site_Site' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'PlApp_PlanningApplications' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'CA_BuildingRegulations' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'Site_Site' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'PlApp_PlanningApplications' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [38401][-none-][WARN] ModuleNameMapper | mapName | 'CA_BuildingRegulations' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [48286][-none-][WARN] ModuleNameMapper | mapName | 'Site_Site' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [48286][-none-][WARN] ModuleNameMapper | mapName | 'PlApp_PlanningApplications' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [48286][-none-][WARN] ModuleNameMapper | mapName | 'CA_BuildingRegulations' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [48286][1][WARN] ModuleNameMapper | toLegacy | 'Site_Site' not mapped
Sat Nov 11 16:03:43 2023 [48286][1][WARN] ModuleNameMapper | mapName | 'Site_Site' not mapped to 'frontend'
Sat Nov 11 16:03:43 2023 [48286][1][WARN] ModuleNameMapper | toLegacy | 'Site_Site' not mapped
Sat Nov 11 16:03:43 2023 [48286][1][ERROR] Unable to find relationship opportunities_site_site_1
Sat Nov 11 16:03:43 2023 [48286][1][WARN] opportunities_site_site_1opportunities_ida for opportunities_site_site_1 failed to load

Sat Nov 11 16:03:43 2023 [48286][1][WARN] ModuleNameMapper | toLegacy | 'Site_Site' not mapped
Sat Nov 11 16:03:43 2023 [48286][1][WARN] ModuleNameMapper | toLegacy | 'Site_Site' not mapped

TIA

I’ve seen those messages in my logs and for now I’ve just been ignoring them. I don’t think they’re relevant (unless you have something broken in the app).

that’s good to know thanks, i was thinking it may have something to do with some of the issues i have, but must be something else.

Do you also have the following:

[ERROR] Unable to find relationship emails_email_templates
[ERROR] Unable to find relationship projects_contacts_resources
[ERROR] Unable to find relationship am_projecttemplates_contacts_resources
[ERROR] Unable to find relationship projects_contacts_resources
[ERROR] Unable to find relationship am_projecttemplates_contacts_resources
[ERROR] Unable to find relationship projects_users_resources
[ERROR] Unable to find relationship am_projecttemplates_users_resources

Im trying to get a full working system, but that dream always seem to escape me :confused:

Have you tried Admin/ Repair Relationships?

Yes, but it’s made no difference.
I think i may have deleted some files at some point>?

My legacy/metadata folder contains emails_email_templatesMetaData.php , isnt that where the relationship should be found?

Sorry, I don’t know the answer, sometimes it’s hard to track these things, and impossible to do it on a system I’m not seeing directly.

Hey @Bungle,

I’ve searched the code for the warning message. It comes from: public/legacy/include/portability/ModuleNameMapper.php

From there, by reading the code, I was able to find out that there is a configuration file that maps the legacy module names to front end names.

File: public/legacy/include/portability/module_name_map.php

sample from the file:

    'Prospects' => [
        'frontend' => 'prospects',
        'core' => 'Prospects'
    ],
    'ProspectLists' => [
        'frontend' => 'prospect-lists',
        'core' => 'ProspectLists'
    ],
    'Documents' => [
        'frontend' => 'documents',
        'core' => 'Documents'
    ],

At the end of the file it has an import for custom files, using Suite7’s extension mechanism:


if (file_exists('custom/application/Ext/ModuleNameMap/module_name_map.ext.php')) {
    /* @noinspection PhpIncludeInspection */
    include('custom/application/Ext/ModuleNameMap/module_name_map.ext.php');
}

I did a quick search on the forum for module_name_map and I think you can extend $module_name_map in a upgrade safe way, by doing:

See the following posts:

1 Like