Index: branches/5.0.x/core/kernel/db/cat_dbitem.php =================================================================== diff -u -N -r12734 -r13228 --- branches/5.0.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 12734) +++ branches/5.0.x/core/kernel/db/cat_dbitem.php (.../cat_dbitem.php) (revision 13228) @@ -1,6 +1,6 @@ GetDBField('CategoryId') > 0 ? $this->GetDBField('CategoryId') : $this->Application->GetVar('m_cat_id'); $this->assignToCategory($primary_category, true); + $this->SetDBField('CategoryId', $primary_category); // set primary category in item object } function Update($id=null, $system_update=false)