In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Dependency Graph View Issue ] Relation Graph ] Vertical ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000398 [In-Portal CMS] Optimization task always 2009-10-17 07:12 2012-07-25 05:32
Reporter alex View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0000398: Partially move kCatDBItem and CreategoryItem class contents to OnBefore/OnAfter events
Description Classes kCatDBItem and CreategoryItem were created before OnBefore/OnAfter events were invented. That's why most of their code is not located in them, as it should. When OnBefore/OnAfter events are used with that classes, then it in most cases lead to unpredictable behavior and hardly detectable processing logic errors.

For example you expect, that OnAfterItemCreate is called after category item is created. But it happens in the middle and after it's called category item is assigned to primary category. Created category item (in state available in OnAfterItemCreate event) won't be able to load at all, because it JOINed to CategoryItems table, where record is not present at the moment.

How this happens now:
1. kCatDBItem::Create()
2. kCatDBEventHandler::OnAfterItemCreate(&$event)
3. kCatDBItem::assignPrimaryCategory()
4. kCatDBItem::Update()
5. kCatDBEventHandler::OnAfterItemUpdate(&$event)

How this should happen:
1. kCatDBItem::Create()
2. kCatDBItem::assignPrimaryCategory()
3. kCatDBItem::Update()
4. kCatDBEventHandler::OnAfterItemUpdate(&$event)
6. kCatDBEventHandler::OnAfterItemCreate(&$event)

Because what's the point of OnAfter event if it's called in the middle and not at the end. Because of that there is no way to control what code (customized or original) will go first.
Additional Information



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker