Reputation: 8457
I've got a heavily extended SugarCRM installation and have run into a never before seen issue. I hope someone can help. In my "Patients" module, there's an "Appointments" subpanel that's missing a field in the listview. To try and troubleshoot this problem, I'm in Studio under Patients->Subpanels and I click "Appointments" and I get this error:
Notice: Undefined variable: originalSubpanel in /home/developer/WebDev/Dev/html/ics/crm/modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php on line 101 Fatal error: Call to a member function get_list_fields() on null in /home/developer/WebDev/Dev/html/ics/crm/modules/ModuleBuilder/parsers/views/DeployedSubpanelImplementation.php on line 101
The debug mode
log shows this FATAL ERROR:
[FATAL] Failed to load original or custom subpanel data for cases_meetings_1 in modules/Meetings/metadata/subpanels/Appoitments.php
FYI - Cases = Patients, Meetings = Appointments
From my understanding, this is being caused by the "load_subpanel" method returning a false
. I tracked down the "load_subpanel" method in SubPanelDefinitions.php and found this code:
function load_subpanel($name, $reload = false, $original_only = false) {
if (!is_dir('modules/' . $this->layout_defs ['subpanel_setup'][strtolower($name)] ['module'])) {
return false;
}
$subpanel = new aSubPanel($name, $this->layout_defs ['subpanel_setup'] [strtolower($name)], $this->_focus, $reload, $original_only);
// only return the subpanel object if we can display it.
if ($subpanel->canDisplay == true) {
return $subpanel;
}
// by default return false so we don't show anything if it's not required.
return false;
So I went into the "Display Modules and Subpanels" and that subpanel is in the "Display" column, which means it should have 'canDisplay' set as true.
Has anyone run into this before and have any idea where I can look next?
Thanks!
Upvotes: 1
Views: 539
Reputation: 8457
After several more hours of fighting this problem, I have discovered that the relationship
between Cases and Meetings was improperly built. Deleting this relationship and rebuilding it has solved the problem.
Upvotes: 1