diff --git a/src/services/Process.php b/src/services/Process.php index bb86ab72..0ddd4b7c 100644 --- a/src/services/Process.php +++ b/src/services/Process.php @@ -369,9 +369,6 @@ public function processFeed($step, $feed, &$processedElementIds, $feedData = nul } } - // Set the attributes for the element - $element->setAttributes($attributeData, false); - $contentData = []; if (isset($attributeData['enabled'])) { // Set the site-specific status as well, but retain all other site statuses @@ -390,8 +387,13 @@ public function processFeed($step, $feed, &$processedElementIds, $feedData = nul $element->setEnabledForSite($enabledForSite); $contentData['enabled'] = $element->enabled; $contentData['enabledForSite'] = $element->getEnabledForSite($element->siteId); + + unset($attributeData['enabled']); } + // Set the attributes for the element + $element->setAttributes($attributeData, false); + // Then, do the same for custom fields. Again, this should be done after populating the element attributes foreach ($feed['fieldMapping'] as $fieldHandle => $fieldInfo) { if (Hash::get($fieldInfo, 'field')) {