Exception in Controller: Subpanel was not defined #4311

Open
opened 2026-02-20 16:16:03 -05:00 by deekerman · 3 comments
Owner

Originally created by @ebogaard on GitHub (Jun 3, 2020).

Issue

I have several SuiteCRM instances running. All configured similarly and on the same version. 7.10.25 at the moment, but I've seen this error message in older versions as well.

Expected Behavior

I expect no errors about undefined Subpanels in any way or form. Only if there are actual config errors in the vardefs.

Actual Behavior

In some CRMs and only with some users and in some modules, I see the following error in the php log:

2020-06-03T13:54:33+0200 [16858][748e404a-e232-4c0c-f70f-5aa6a4deb6c6][FATAL] Exception handling in /xxx/include/MVC/Controller/SugarController.php:400
2020-06-03T13:54:33+0200 [16858][748e404a-e232-4c0c-f70f-5aa6a4deb6c6][FATAL] Exception in Controller: Subpanel was not defined
2020-06-03T13:54:33+0200 [16858][748e404a-e232-4c0c-f70f-5aa6a4deb6c6][FATAL] backtrace:
#0 /xxx/include/SubPanel/SubPanelViewer.php(61): sugar_die('Subpanel was no...')
#1 /xxx/include/MVC/Controller/SugarController.php(1093): require_once('/xxx/...')
#2 /xxx/include/MVC/Controller/SugarController.php(468): SugarController->handleActionMaps()
#3 /xxx/include/MVC/Controller/SugarController.php(373): SugarController->process()
#4 /xxx/include/MVC/SugarApplication.php(113): SugarController->execute()
#5 /xxx/index.php(52): SugarApplication->execute()

I can't replicate this in any way or form when I login with my own user or with any other users that don't experience this issue.
The users don't seem to experience any kind of negative impact: the CRM is working for them as usual.

Possible Fix

I suspect some user settings are the culprit. For example when a certain view is saved, but then one of those subpanels is removed from the view using studio or otherwise.
But after looking through all the user related settings in the database, I couln't find anything of this kind of user related config.

Steps to Reproduce

As said earlier, it's not possible for me to replicate this issue. But I see it in multiple CRMs and woth multiple users.

I'm willing to participate in tracing and fixing this bug. For this, I see two first steps:

  1. making sure there is no user-config or other config that saves a module-view that contains subpanels als well and leads to this error after the subpanels are removed using stidio or otherwise. Does anyone know if there is such a configuration?
  2. tracing where this message is coming from. I've located the source and implementend extra logging in "include/SubPanel/SubPanelViewer.php" to trace the actual users and module used, but am unable to trace the undefined subpanel. Is there a way to get this subpanel name that is undefined? If so, that may lead to

Context

Your Environment

  • SuiteCRM Version used: 7.10.25
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): any
  • Environment name and version (e.g. MySQL, PHP 7): MariaDB, PHP 7.2
  • Operating System and version (e.g Ubuntu 16.04): RHEL 7
Originally created by @ebogaard on GitHub (Jun 3, 2020). <!--- Provide a general summary of the issue in the **Title** above --> <!--- Before you open an issue, please check if a similar issue already exists or has been closed before. ---> <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> #### Issue <!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug --> <!--- Ensure that all code ``` is surrounded ``` by triple back quotes. This can also be done over multiple lines --> I have several SuiteCRM instances running. All configured similarly and on the same version. 7.10.25 at the moment, but I've seen this error message in older versions as well. #### Expected Behavior I expect no errors about undefined Subpanels in any way or form. Only if there are actual config errors in the vardefs. #### Actual Behavior <!--- Tell us what happens instead --> <!--- Also please check relevant logs (suitecrm.log, php error.log etc.) --> In some CRMs and only with some users and in some modules, I see the following error in the php log: ``` 2020-06-03T13:54:33+0200 [16858][748e404a-e232-4c0c-f70f-5aa6a4deb6c6][FATAL] Exception handling in /xxx/include/MVC/Controller/SugarController.php:400 2020-06-03T13:54:33+0200 [16858][748e404a-e232-4c0c-f70f-5aa6a4deb6c6][FATAL] Exception in Controller: Subpanel was not defined 2020-06-03T13:54:33+0200 [16858][748e404a-e232-4c0c-f70f-5aa6a4deb6c6][FATAL] backtrace: #0 /xxx/include/SubPanel/SubPanelViewer.php(61): sugar_die('Subpanel was no...') #1 /xxx/include/MVC/Controller/SugarController.php(1093): require_once('/xxx/...') #2 /xxx/include/MVC/Controller/SugarController.php(468): SugarController->handleActionMaps() #3 /xxx/include/MVC/Controller/SugarController.php(373): SugarController->process() #4 /xxx/include/MVC/SugarApplication.php(113): SugarController->execute() #5 /xxx/index.php(52): SugarApplication->execute() ``` I can't replicate this in any way or form when I login with my own user or with any other users that don't experience this issue. The users don't seem to experience any kind of negative impact: the CRM is working for them as usual. #### Possible Fix <!--- Not obligatory, but suggest a fix or reason for the bug --> I suspect some user settings are the culprit. For example when a certain view is saved, but then one of those subpanels is removed from the view using studio or otherwise. But after looking through all the user related settings in the database, I couln't find anything of this kind of user related config. #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> As said earlier, it's not possible for me to replicate this issue. But I see it in multiple CRMs and woth multiple users. I'm willing to participate in tracing and fixing this bug. For this, I see two first steps: 1. making sure there is no user-config or other config that saves a module-view that contains subpanels als well and leads to this error after the subpanels are removed using stidio or otherwise. Does anyone know if there is such a configuration? 2. tracing where this message is coming from. I've located the source and implementend extra logging in "include/SubPanel/SubPanelViewer.php" to trace the actual users and module used, but am unable to trace the undefined subpanel. Is there a way to get this subpanel name that is undefined? If so, that may lead to #### Context <!--- How has this bug affected you? What were you trying to accomplish? --> <!--- If you feel this should be a low/medium/high priority then please state so --> #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.10.25 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): any * Environment name and version (e.g. MySQL, PHP 7): MariaDB, PHP 7.2 * Operating System and version (e.g Ubuntu 16.04): RHEL 7
Author
Owner

@pgorod commented on GitHub (Jun 3, 2020):

This #8640 would get you all the information you need.

@pgorod commented on GitHub (Jun 3, 2020): This #8640 would get you all the information you need.
Author
Owner

@ebogaard commented on GitHub (Jun 4, 2020):

With additional logging, I could trace the issue coming from the following URI:

https://xxx//index.php?module=Accounts&action=SubPanelViewer&record=xyz

Based on "include/SubPanel/SubPanelViewer.php", it seems that the "action=SubPanelViewer" isn't a valid action without a "subpanel=" parameter in the REQUEST.
I did a grep, but can't find code that refers the SubpanelViewer action, without also adding and filling the subpanel parameter to the url. Anyone know of a location this happens?

@ebogaard commented on GitHub (Jun 4, 2020): With additional logging, I could trace the issue coming from the following URI: ``` https://xxx//index.php?module=Accounts&action=SubPanelViewer&record=xyz ``` Based on "include/SubPanel/SubPanelViewer.php", it seems that the "action=SubPanelViewer" isn't a valid action without a "subpanel=" parameter in the REQUEST. I did a grep, but can't find code that refers the SubpanelViewer action, without also adding and filling the subpanel parameter to the url. Anyone know of a location this happens?
Author
Owner

@pgorod commented on GitHub (Jun 5, 2020):

It would be easier with the full stack trace and the parameter values at each step. I am curious as to how this error is coming from the Controller actions, not from a view, because normally the subpanel would only get called when rendering the view.

This reference is coming either from action_file_map or action_view_map

@pgorod commented on GitHub (Jun 5, 2020): It would be easier with the full stack trace and the parameter values at each step. I am curious as to how this error is coming from the Controller actions, not from a view, because normally the subpanel would only get called when rendering the view. This reference is coming either from `action_file_map` or `action_view_map`
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#4311
No description provided.