In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
845 [In-Portal CMS] Optimization task N/A 2010-08-31 13:21 2010-11-30 12:48
alex  
Dmitry  
normal  
closed 5.1.0  
fixed  
 
none 5.1.1-B1  
http://groups.google.com/group/in-portal-dev/browse_thread/thread/c4120379706850af
0
0000845: Revising usage of NULL columns
I think, that we should review how we use NULL columns in system.

For example we INT field can't have empty value unless it is NULL. VARCHAR fields can have empty value and in most cases are NOT NULL.

What I propose is at least to convert all columns, that contain DATE and USER_ID in them to NULL. We also have ModifiedById field for topics set to 0 in database, but to -1 (root) in unit config, which will make topic always modified by "root", once it is created on front-end.
To detect all places, needs to be changed unit config validator needs to altered to search for such inconsistencies. This will save time, when we need to look at each table field to detect, that it's need to be changed.
parent of 0000893closed  (5.1.1)alex In-Portal CMS Unable to suggest any item (link, article, topic) 
parent of 0000908closed  (5.1.1)alex In-Commerce Fatal Error on Creating Coupon 
parent of 0000917closed  (5.1.1)alex In-Commerce Fatal Error on Creating Discount and Affiliate Plan Items 
parent of 0000937closed  (5.1.2)alex In-Portal CMS Issues with Exporting Category Items 
related to 0000707closed  (5.1.1)alex In-Portal CMS SQL Error during usage of "Re-build Multilanguage Fields" functionality 
child of 0000720closed  (5.1.2)Dmitry In-Portal CMS Can't search by Username in "Session Log" grid 
patch not_null_fix_core.patch (39,757) 2010-09-22 04:12
http://tracker.in-portal.org/file_download.php?file_id=779&type=bug
patch not_null_fix_modules.patch (68,392) 2010-09-22 04:12
http://tracker.in-portal.org/file_download.php?file_id=780&type=bug
jpg NULL-Fix-ErrorsAfterValidation.jpg (186,060) 2010-09-22 11:24
http://tracker.in-portal.org/file_download.php?file_id=783&type=bug
jpg

patch Null-Core-Dmitry.patch (40,084) 2010-09-22 23:28
http://tracker.in-portal.org/file_download.php?file_id=785&type=bug
patch Null-Modules-Dmitry.patch (70,891) 2010-09-22 23:29
http://tracker.in-portal.org/file_download.php?file_id=786&type=bug
Issue History
2010-12-06 10:47 Dmitry Relationship added child of 0000720
2010-11-30 12:48 Dmitry Note Added: 0003002
2010-11-30 12:48 Dmitry Status resolved => closed
2010-11-30 11:54 Dmitry Relationship added parent of 0000937
2010-11-02 14:17 Dmitry Note Edited: 0002951 bug_revision_view_page.php?bugnote_id=0002951#r606
2010-11-02 14:16 Dmitry Status reviewed and tested => resolved
2010-11-02 14:16 Dmitry Resolution reopened => fixed
2010-11-02 14:16 Dmitry Note Added: 0002951
2010-11-02 14:16 Dmitry Status needs testing => reviewed and tested
2010-11-02 14:15 Dmitry Relationship added parent of 0000917
2010-11-01 14:23 Dmitry Note Added: 0002938
2010-10-28 11:37 alex Note Added: 0002928
2010-10-28 11:37 alex Status needs feedback => needs testing
2010-10-28 10:40 Dmitry Note Edited: 0002927 bug_revision_view_page.php?bugnote_id=0002927#r591
2010-10-28 10:40 Dmitry Assigned To alex => Dmitry
2010-10-28 10:40 Dmitry Note Added: 0002927
2010-10-28 10:40 Dmitry Status resolved => needs feedback
2010-10-28 10:40 Dmitry Resolution fixed => reopened
2010-10-28 10:36 Dmitry Relationship added parent of 0000908
2010-10-19 05:06 alex Relationship added parent of 0000893
2010-09-25 13:38 alex Note Added: 0002865
2010-09-25 13:38 alex Status reviewed and tested => resolved
2010-09-25 13:38 alex Fixed in Version => 5.1.1-B1
2010-09-25 13:38 alex Resolution open => fixed
2010-09-25 13:38 alex Assigned To !COMMUNITY => alex
2010-09-25 13:38 alex Changeset attached 5.1.x r13962
2010-09-25 13:37 alex Changeset attached 5.1.x r13961
2010-09-25 13:36 alex Changeset attached 5.1.x r13960
2010-09-25 13:36 alex Changeset attached 5.1.x r13959
2010-09-25 13:34 alex Changeset attached 5.1.x r13958
2010-09-25 13:33 alex Changeset attached 5.1.x r13957
2010-09-25 13:32 alex Developer Dmitry => alex
2010-09-25 13:32 alex Note Added: 0002864
2010-09-25 13:32 alex Assigned To alex => !COMMUNITY
2010-09-25 13:32 alex Status needs testing => reviewed and tested
2010-09-22 23:29 Dmitry Note Added: 0002861
2010-09-22 23:29 Dmitry Developer alex => Dmitry
2010-09-22 23:29 Dmitry Status needs work => needs testing
2010-09-22 23:29 Dmitry File Added: Null-Modules-Dmitry.patch
2010-09-22 23:28 Dmitry File Added: Null-Core-Dmitry.patch
2010-09-22 11:26 Dmitry Note Added: 0002859
2010-09-22 11:26 Dmitry Assigned To !COMMUNITY => alex
2010-09-22 11:26 Dmitry Status needs testing => needs work
2010-09-22 11:24 Dmitry File Added: NULL-Fix-ErrorsAfterValidation.jpg
2010-09-22 04:13 alex Note Added: 0002856
2010-09-22 04:12 alex Assigned To alex => !COMMUNITY
2010-09-22 04:12 alex Developer => alex
2010-09-22 04:12 alex Status needs work => needs testing
2010-09-22 04:12 alex File Added: not_null_fix_modules.patch
2010-09-22 04:12 alex File Added: not_null_fix_core.patch
2010-09-02 01:43 alex Note Edited: 0002763 bug_revision_view_page.php?bugnote_id=0002763#r558
2010-09-01 16:24 Dmitry Note Added: 0002763
2010-09-01 16:24 Dmitry Assigned To => alex
2010-09-01 16:24 Dmitry Status active => needs work
2010-09-01 03:56 alex Note Added: 0002761
2010-09-01 03:56 alex Target Version Icebox => 5.1.1
2010-09-01 03:56 alex Relationship added related to 0000707
2010-08-31 13:21 alex New Issue
2010-08-31 13:21 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/c4120379706850af

Notes
(0002761)
alex   
2010-09-01 03:56   
Moving to 5.1.1, since it's related task is already there.
(0002763)
Dmitry   
2010-09-01 16:24   
(edited on: 2010-09-02 01:43)
Alex, it's been assigned to you.

(0002856)
alex   
2010-09-22 04:13   
Unit config validator changes:
==============================
1. checks, that all real fields, that are using kDateFormatter have NULL default value in database
2. checks, that all real fields named like "*ById" have NULL default value in database
3. virtual fields have "type" and "default" options
4. virtual fields don't have "not_null" option
5. ignore default value mismatch for "text" fields, since in MySQL text fields can't have default value
6. all calculated fields have corresponding virtual fields
7. not synced with db default field value of "int" fields not always was detected

To see, that it works, you must apply only "unit_config_reader.php" patch file only and see, that new type of errors have appeared. Then apply all other patches and verify, that reported errors have been fixed.
(0002859)
Dmitry   
2010-09-22 11:26   
Tested as directed.

Most of the Validation errors are gone, however a few still persist. Please see attached screen and explain if some NON-text validation comparisons should be ignored.

Thanks.
(0002861)
Dmitry   
2010-09-22 23:29   
Please test and commit.
(0002864)
alex   
2010-09-25 13:32   
ok
(0002865)
alex   
2010-09-25 13:38   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0000845: Revising usage of NULL columns
(0002927)
Dmitry   
2010-10-28 10:40   
This needs to be retested again based on the following discussion:

http://groups.google.com/group/in-portal-bugs/browse_thread/thread/4032a058c92f6c63

(0002928)
alex   
2010-10-28 11:37   
Since it needs to be retested I've changed status to "Needs Testing" instead of "Needs Work"
(0002938)
Dmitry   
2010-11-01 14:23   
A few issues found so far (will be reported separately):

'Weight' => Array('type'=>'float', 'min_value_exc'=>0, 'formatter' => 'kFormatter', 'format' => '%0.2f', 'default' => 0)

in-commerce/units/affiliate_plans_items/affiliate_plans_items_config.php
in-commerce/units/discount_items/discount_items_config.php
(0002951)
Dmitry   
2010-11-02 14:16   
(edited on: 2010-11-02 14:17)
Reviewed and tested.

Separate task (0000917) has been created for 2 issues found above.

(0003002)
Dmitry   
2010-11-30 12:48   
Closing released 5.1.1 task.