Index: branches/RC/core/install/install_toolkit.php =================================================================== diff -u -N -r11711 -r11760 --- branches/RC/core/install/install_toolkit.php (.../install_toolkit.php) (revision 11711) +++ branches/RC/core/install/install_toolkit.php (.../install_toolkit.php) (revision 11760) @@ -559,7 +559,7 @@ $category_fields = Array ( $fields['name'] => $name, 'Filename' => $name, 'AutomaticFilename' => 1, - $fields['description'] => $description, 'Status' => $status, + $fields['description'] => $description, 'Status' => $status, 'Priority' => -9999, ); $category_fields['ParentId'] = $this->Application->findModule('Name', 'Core', 'RootCat'); @@ -582,6 +582,13 @@ // ensure, that newly created category has proper value in Priority field $priority_helper->recalculatePriorities($event, 'ParentId = ' . $category_fields['ParentId']); + // update Priority field in object, becase "CategoriesItem::Update" method will be called + // from "kInstallToolkit::setModuleItemTemplate" and otherwise will set 0 to Priority field + $sql = 'SELECT Priority + FROM ' . $category->TableName . ' + WHERE ' . $category->IDField . ' = ' . $category->GetID(); + $category->SetDBField('Priority', $this->Conn->GetOne($sql)); + return $category; }