In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
846 [In-Portal CMS] Install / Upgrages bug report always 2010-08-31 13:24 2011-03-30 09:53
alex  
alex  
normal  
closed 5.1.0  
fixed  
 
none 5.1.2-B1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/a4185b1e52d096c6
0
0000846: Several notices about undefined constants during installation
In-Portal installation is divided into several steps. Because of In-Portal is module-based, then each of the modules can have it's own specific installation php code. Each of In-Portal modules can have it's "constants.php", where module developers can define module-specific constants to be used throughout the module.

While In-Portal isn't completely installed, then unit config files of all modules are included, but not module "constants.php" files. This isn't a bad thing to to, but isn't a good one either. One side effect of this is that, when we are using module-specific constants in it's unit config files, then we will get php notices about each used constant, while module is being installed.

Unit config files of all not-yet installed modules are included because they can be used in module-specific "install.php" file. Since we don't know are they used or not, then we include them in any case.

File "constants.php" of each module are only included for installed modules and this raises such a problem. Because of such file contains a constant definition, then we can't include same file twice, so I propose, that we also include "constants.php" files from all modules during installation.

This is hard piece of knowledge to understand, since developers usually don't care about how installation system of In-Portal works until their module suddenly stops installing correctly :)
This doesn't break anything for now. This is just not good to have notices/warnings if we could prevent them from happening.
patch notices-about-undefined-constants-during-installation.patch (985) 2010-12-05 20:16
http://tracker.in-portal.org/file_download.php?file_id=878&type=bug
Issue History
2011-03-30 09:53 Dmitry Note Added: 0003337
2011-03-30 09:53 Dmitry Status resolved => closed
2011-01-11 05:03 alex Changeset attached 5.1.x r14162
2011-01-11 05:03 alex Note Added: 0003205
2011-01-11 05:03 alex Status reviewed and tested => resolved
2011-01-11 05:03 alex Fixed in Version => 5.1.2-B1
2011-01-11 05:03 alex Resolution open => fixed
2011-01-11 05:03 alex Assigned To !COMMUNITY => alex
2011-01-11 05:03 alex Note Added: 0003204
2011-01-11 05:03 alex Status needs testing => reviewed and tested
2011-01-05 14:08 alex Note Added: 0003172
2011-01-05 12:07 Dmitry Note Added: 0003165
2010-12-05 20:16 Dmitry Note Added: 0003109
2010-12-05 20:16 Dmitry Assigned To Dmitry => !COMMUNITY
2010-12-05 20:16 Dmitry Status needs work => needs testing
2010-12-05 20:16 Dmitry File Added: notices-about-undefined-constants-during-installation.patch
2010-09-28 14:04 Dmitry Assigned To => Dmitry
2010-09-28 14:04 Dmitry Status active => needs work
2010-09-28 12:03 Dmitry Developer => Dmitry
2010-09-28 12:03 Dmitry Target Version Icebox => 5.1.2
2010-08-31 13:24 alex New Issue
2010-08-31 13:24 alex Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/a4185b1e52d096c6

Notes
(0003109)
Dmitry   
2010-12-05 20:16   
Please review and test.
(0003165)
Dmitry   
2011-01-05 12:07   
Reminder sent to: alex

This needs to be reviewed. Please note that I did NOT want to make changes to Application class so it's not conflicting to the refactoring of Application done 5.2.0 release. I believe it's a better solution at the moment.
(0003172)
alex   
2011-01-05 14:08   
I will see, what I can change to get nice code + less merging issues in 5.2.0.
(0003204)
alex   
2011-01-11 05:03   
Nice.

I've applied some minor changes to code (moved to new method).
(0003205)
alex   
2011-01-11 05:03   
Fix committed to 5.1.x branch. Commit Message:

1. Fixes 0000846: Several notices about undefined constants during installation
2. Commit on behalf of Dmitry
(0003337)
Dmitry   
2011-03-30 09:53   
Closing, since 5.1.2 release has been released.