-
Type: Bug Report
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.2.0
-
Fix Version/s: 5.2.1-B2
-
Component/s: Unit Configs
-
Labels:
-
External issue URL:
-
Change Log Message:Separated Module Installation with Class Constants in Unit Config
-
Story Points:1
-
External issue ID:1441
-
Copy Issue Key:
-
Patch Instructions:
When doing separate module installation, then it's "constants.php" file isn't included during Application initialization because module isn't installed yet.
This creates Fatal Error in case if classes defined in "constants.php" are used inside unit configs of this not yet installed module.
As a solution I'm proposing to add these lines:
$constants_file = FULL_PATH . '/' . $module_folder . '/constants.php';
if ( file_exists($constants_file) )
{ require_once $constants_file; }after these lines:
include_once(FULL_PATH . '/core/kernel/startup.php');
require_once FULL_PATH . '/core/install/install_toolkit.php';
in each module's install.php file.