Separate module install with class constants in unit config on 5.2.0

3 views
Skip to first unread message

Alexander Obuhovich

unread,
Nov 9, 2012, 4:05:48 AM11/9/12
to Bugs In-Portal
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.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry A.

unread,
Nov 12, 2012, 12:42:37 AM11/12/12
to in-port...@googlegroups.com
Hi Alex,


Yes, I agree with this, and created a task for described issue:




DA
Reply all
Reply to author
Forward
0 new messages