From 2fdddaa7a5a7ff6222c46eb6269045d6450911f3 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 26 Jan 2016 12:41:57 -0500 Subject: [PATCH] Now handling sub-cats with bad parent data - making top level cats --- models/admin/management/import.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/admin/management/import.php b/models/admin/management/import.php index b8dcc7d0..20f15abd 100644 --- a/models/admin/management/import.php +++ b/models/admin/management/import.php @@ -437,9 +437,9 @@ class GlmMembersAdmin_management_import if (isset($category[$x['parent_id']])) { $category[$x['parent_id']]['subcat'][$x['category_id']] = $x; } else { - $templateData['genError'] = 'There is at least one sub-category that does not have a matching top-level parent! ('.$x['name'].')
- This could be a third-level category. Perhaps we can handle this when we have time to work on this a bit.'; - $failure = true; + // Since the parent doesn't exist, we're just going to make this one a parent. + $category[$x['category_id']] = $x; + $category[$x['category_id']]['subcat'] = array(); } } } -- 2.17.1