From cb66674e5ee412dee43c3f7263b317fae0692f5a Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Wed, 26 Oct 2016 07:31:58 -0400 Subject: [PATCH] Don't force an exact match for parents --- services/Import_CategoryService.php | 4 +--- services/Import_EntryService.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/services/Import_CategoryService.php b/services/Import_CategoryService.php index e2a534b..a26dbff 100644 --- a/services/Import_CategoryService.php +++ b/services/Import_CategoryService.php @@ -175,9 +175,7 @@ private function prepareParentForElement($data, $groupId) // Find matching element $criteria = craft()->elements->getCriteria(ElementType::Category); $criteria->groupId = $groupId; - - // Exact match - $criteria->search = '"'.$data.'"'; + $criteria->search = $data; $parentCategory = $criteria->first(); } diff --git a/services/Import_EntryService.php b/services/Import_EntryService.php index 4a6633f..7b4b468 100644 --- a/services/Import_EntryService.php +++ b/services/Import_EntryService.php @@ -227,9 +227,7 @@ private function prepareParentForElement($data, $sectionId) // Find matching element $criteria = craft()->elements->getCriteria(ElementType::Entry); $criteria->sectionId = $sectionId; - - // Exact match - $criteria->search = '"'.$data.'"'; + $criteria->search = $data; // Return the first found element for connecting if ($criteria->total()) {