You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a feed has "Disable/delete missing elements" enabled and the processed feed is empty no elements are disabled/deleted.
Steps to reproduce
Feed with Disable/delete missing elements
Run feed without results.
Additional info
I believe the following lines in the afterProcessFeed function in the Process service are responsible.
In this case $processedElementIds is an empty array.
if ($processedElementIds) {
$elementsToDeleteDisable = array_diff($settings['existingElements'], $processedElementIds);
if ($elementsToDeleteDisable) {
if (DuplicateHelper::isDisable($feed)) {
$this->_service->disable($elementsToDeleteDisable);
$message = 'The following elements have been disabled: ' . Json::encode($elementsToDeleteDisable) . '.';
} elseif (DuplicateHelper::isDisableForSite($feed)) {
$this->_service->disableForSite($elementsToDeleteDisable);
$message = 'The following elements have been disabled for the target site: ' . Json::encode($elementsToDeleteDisable) . '.';
} else {
$this->_service->delete($elementsToDeleteDisable);
$message = 'The following elements have been deleted: ' . Json::encode($elementsToDeleteDisable) . '.';
}
Plugin::info($message);
Plugin::debug($message);
}
}
Craft version: 4.5.3
PHP version: 8.1
Database driver & version: MySQL 5.7
Plugins & versions: Feed me 5.2.0
The text was updated successfully, but these errors were encountered:
I would have thought the process would just take from settings e.g. if you chose to delete missing entries, then an empty feed will delete all missing entries ... same for disable.
Description
When a feed has "Disable/delete missing elements" enabled and the processed feed is empty no elements are disabled/deleted.
Steps to reproduce
Additional info
I believe the following lines in the afterProcessFeed function in the Process service are responsible.
In this case
$processedElementIds
is an empty array.The text was updated successfully, but these errors were encountered: