[FATAL] Exception in Controller: No module defined
I have this error when accessing an Email record:
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] Exception handling in /var/www/crm/public/legacy/include/MVC/Controller/SugarController.php:397
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] Exception in Controller: No module defined
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] backtrace:
#0 /var/www/crm/public/legacy/include/portability/RouteConverter.php(120): RouteConverter->convert('', 'DetailView', '', Array)
#1 /var/www/crm/public/legacy/include/portability/RouteConverter.php(91): RouteConverter->convertUri('index.php?modul...')
#2 /var/www/crm/public/legacy/include/Smarty/plugins/function.convert_link.php(34): RouteConverter->generateUiLink('index.php?modul...')
#3 /var/www/crm/public/legacy/cache/smarty/templates_c/b58b1d5c6daa9ee2c39c4f35d132ca137ad81d21_0.file.EmailsDetailView.tpl.php(713): smarty_function_convert_link(Array, Object(Smarty_Internal_Template))
#4 /var/www/crm/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66cc954b87fd34_89982787(Object(Smarty_Internal_Template))
#5 /var/www/crm/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#6 /var/www/crm/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#7 /var/www/crm/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 0)
#8 /var/www/crm/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#9 /var/www/crm/public/legacy/include/Sugar_Smarty.php(150): Smarty_Internal_TemplateBase->fetch('cache/themes/ps...', NULL, NULL, NULL)
#10 /var/www/crm/public/legacy/include/TemplateHandler/TemplateHandler.php(362): Sugar_Smarty->fetch('cache/themes/ps...')
#11 /var/www/crm/public/legacy/include/EditView/EditView2.php(934): TemplateHandler->displayTemplate('Emails', 'EmailsDetailVie...', 'include/DetailV...', false, Array)
#12 /var/www/crm/public/legacy/modules/Emails/include/DetailView/EmailsDetailView.php(115): EditView->display(true, false)
#13 /var/www/crm/public/legacy/include/MVC/View/views/view.detail.php(81): EmailsDetailView->display()
#14 /var/www/crm/public/legacy/modules/Emails/views/view.detail.php(85): ViewDetail->display()
#15 /var/www/crm/public/legacy/include/MVC/View/SugarView.php(210): EmailsViewDetail->display()
#16 /var/www/crm/public/legacy/include/MVC/Controller/SugarController.php(432): SugarView->process()
#17 /var/www/crm/public/legacy/include/MVC/Controller/SugarController.php(363): SugarController->processView()
#18 /var/www/crm/public/legacy/include/MVC/SugarApplication.php(101): SugarController->execute()
#19 /var/www/crm/public/legacy/index.php(52): SugarApplication->execute()
#20 {main}
For some reason the URL query has the correct parameters in a previous call to the function, but then it’s empty:
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] RouteConverter::convertUri: index.php?module=Emails&action=DetailView&record=a5453b14-6bdf-3576-18eb-66c85a85c24c
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] RouteConverter::convertUri: index.php?module=Emails&action=EditView&return_module=Emails&return_action=DetailView
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] RouteConverter::convertUri: index.php?module=&action=DetailView&record=
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] Exception handling in /var/www/crm/public/legacy/include/MVC/Controller/SugarController.php:397
Mon Aug 26 16:54:23 2024 [12690][1][FATAL] Exception in Controller: No module defined
The only “fix” I found so far was disabling the exception in RouteConverter.php::69
:
public function convert(?string $module, ?string $action, ?string $record, ?array $queryParams): string { if (empty($module)) { // throw new InvalidArgumentException('No module defined'); }
This started happening after upgrading to SuiteCRM 8.6.2 (from 8.5.1).
Possible Fix
The only “fix” I found so far was disabling the exception in RouteConverter.php::69
:
public function convert(?string $module, ?string $action, ?string $record, ?array $queryParams): string { if (empty($module)) { // throw new InvalidArgumentException('No module defined'); }
Steps to Reproduce the Issue
1. Upgrade SuiteCRM from 8.5.1 to 8.6.2. 2. Open the Email detail view, e.g. `/#/emails/record/a5453b14-6bdf-3576-18eb-66c85a85c24c`. 3. Observe a blank space in the UI where the usual detail view would be. 4. See the error logged in `suitecrm.log`.
Context
- Upgrade SuiteCRM from 8.5.1 to 8.6.2.
- Only thread I’ve found with the same error, albeit happening somewhere else: https://community.suitecrm.com/t/migrating-from-7-14-4-to-8-6-1-exception-in-controller-no-module-defined-nothing-on-home-screen-after-login/93199
Version
8.6.2