From a7fe857fb27590929586767e99793d8b4777592e Mon Sep 17 00:00:00 2001 From: Francois Suter Date: Tue, 15 Apr 2014 15:18:14 +0200 Subject: [PATCH] [BUGFIX] Wrong building of relations to system categories The task that migrates the DAM category relations makes two critical mistakes: * the uid_local and uid_foreign fields are inverted (sys_category is local, sys_file is foreign) * the table with the categories relation is sys_file_metadata and not sys_file anymore. --- Classes/Task/MigrateDamCategoryRelationsTask.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Task/MigrateDamCategoryRelationsTask.php b/Classes/Task/MigrateDamCategoryRelationsTask.php index d56038a..9b8232e 100644 --- a/Classes/Task/MigrateDamCategoryRelationsTask.php +++ b/Classes/Task/MigrateDamCategoryRelationsTask.php @@ -53,11 +53,11 @@ public function execute() { $categoryRelations = $this->getCategoryRelationsWhereSysCategoryExists(); foreach ($categoryRelations as $categoryRelation) { $insertData = array( - 'uid_local' => $categoryRelation['sys_file_uid'], - 'uid_foreign' => $categoryRelation['sys_category_uid'], + 'uid_local' => $categoryRelation['sys_category_uid'], + 'uid_foreign' => $categoryRelation['sys_file_uid'], 'sorting' => $categoryRelation['sorting'], 'sorting_foreign' => $categoryRelation['sorting_foreign'], - 'tablenames' => 'sys_file', + 'tablenames' => 'sys_file_metadata', 'fieldname' => 'categories' );