Index: trunk/kernel/units/general/cat_dbitem.php =================================================================== diff -u -N -r6093 -r6583 --- trunk/kernel/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 6093) +++ trunk/kernel/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 6583) @@ -60,8 +60,9 @@ $ret = parent::Create(); if ($ret) { + $primary_category = $this->GetDBField('CategoryId') > 0 ? $this->GetDBField('CategoryId') : $this->Application->GetVar('m_cat_id'); $fields_hash = Array( - 'CategoryId' => $this->Application->GetVar('m_cat_id'), + 'CategoryId' => $primary_category, 'ItemResourceId' => $this->GetField('ResourceId'), 'PrimaryCat' => 1, 'ItemPrefix' => $this->Prefix,