PHP Fatal error: Role Create/Edit after upgrade to 7.13.0

Hello everybody.

After upgrade to 7.13.0 when I go from Admin to Role Management I see Roles list, but when I trying to Create o Edit Role I get PHP Fatal error in php_error_log:

[25-Jan-2023 22:39:55 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined method ViewDetail::ViewDetail() in /opt/lampp/htdocs/sugarcrm/custom/modules/ACLRoles/views/view.classic.php:10
Stack trace:
#0 /opt/lampp/htdocs/sugarcrm/include/MVC/View/ViewFactory.php(279): ACLRolesViewClassic->ACLRolesViewClassic()
#1 /opt/lampp/htdocs/sugarcrm/include/MVC/View/ViewFactory.php(244): ViewFactory::_buildClass(‘ACLRolesViewCla…’, Object(ACLRole), Array)
#2 /opt/lampp/htdocs/sugarcrm/include/MVC/View/ViewFactory.php(97): ViewFactory::_buildFromFile(‘custom/modules/…’, Object(ACLRole), Array, ‘classic’, ‘ACLRoles’)
#3 /opt/lampp/htdocs/sugarcrm/include/MVC/Controller/SugarController.php(422): ViewFactory::loadView(‘classic’, ‘ACLRoles’, Object(ACLRole), Array, NULL)
#4 /opt/lampp/htdocs/sugarcrm/include/MVC/Controller/SugarController.php(363): SugarController->processView()
#5 /opt/lampp/htdocs/sugarcrm/include/MVC/SugarApplication.php(101): SugarController->execute()
#6 /opt/lampp/htdocs/sugarcrm/index.php(52): SugarApplication->execute()
#7 {main}
thr in /opt/lampp/htdocs/sugarcrm/custom/modules/ACLRoles/views/view.classic.php on line 10

Any idea?

My configuration: Apache/2.4.54 (Ubuntu), PHP/7.4.33, MariaDB/10.4.27

Try Admin / Repairs / Repair roles

Thank you for your quick answer. Unfortunately, Repair roles did not help. Changing permissions of sugarcrm directory and Quick Repair and Rebuild doesn’t help either. Error message:

[26-Jan-2023 20:25:31 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined method ViewDetail::ViewDetail() in /opt/lampp/htdocs/sugarcrm/custom/modules/ACLRoles/views/view.classic.php:10
Stack trace:
#0 /opt/lampp/htdocs/sugarcrm/include/MVC/View/ViewFactory.php(279): ACLRolesViewClassic->ACLRolesViewClassic()
#1 /opt/lampp/htdocs/sugarcrm/include/MVC/View/ViewFactory.php(244): ViewFactory::_buildClass(‘ACLRolesViewCla…’, Object(ACLRole), Array)
#2 /opt/lampp/htdocs/sugarcrm/include/MVC/View/ViewFactory.php(97): ViewFactory::_buildFromFile(‘custom/modules/…’, Object(ACLRole), Array, ‘classic’, ‘ACLRoles’)
#3 /opt/lampp/htdocs/sugarcrm/include/MVC/Controller/SugarController.php(422): ViewFactory::loadView(‘classic’, ‘ACLRoles’, Object(ACLRole), Array, NULL)
#4 /opt/lampp/htdocs/sugarcrm/include/MVC/Controller/SugarController.php(363): SugarController->processView()
#5 /opt/lampp/htdocs/sugarcrm/include/MVC/SugarApplication.php(101): SugarController->execute()
#6 /opt/lampp/htdocs/sugarcrm/index.php(52): SugarApplication->execute()
#7 {main}
thr in /opt/lampp/htdocs/sugarcrm/custom/modules/ACLRoles/views/view.classic.php on line 10

You have apparently redefined modules/ACLRoles/views/view.classic.php in the custom directory.
You should check your customizations.

1 Like

[blqt], I actually have a view.classic.php file in the custom/modules/ACLRoles/views/ directory, but I didn’t create this file. Now it looks like this:

<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('include/MVC/View/views/view.detail.php');

class ACLRolesViewClassic extends ViewDetail {


 	function ACLRolesViewClassic(){
 		parent::ViewDetail();

        //turn off normal display of subpanels
        $this->options['show_subpanels'] = false; //no longer works in 6.3.0
 	}

 	function display(){
		$this->dv->process();
		echo '<style type="text/css">@import url("custom/modules/ACLRoles/styles/securitygroups.css"); </style>';

		$file = SugarController::getActionFilename($this->action);
		$this->includeClassicFile('modules/'. $this->module . '/'. $file . '.php');
 	}

 	function preDisplay(){
		parent::preDisplay();

		$this->options['show_subpanels'] = false; //eggsurplus: will display subpanels twice otherwise
 	}
}

?>

When I removed it, Role Management works fine :slight_smile: Also the module I made in sudio years ago works fine… So, is it good that I removed it, because I don’t know if its content doesn’t add something else?

That looks like code from SecuritySuite - SugarCRM Teams | SuiteCRM Teams Module

Possibly an old version, or even a very old version. If your system is an upgrade from some old SugarCRM, this could be there in custom.

Thank you for your reply. It is indeed a very old system, updated since SugarCRM v.6.1.7… but it still works! :wink: Have a good day!

1 Like