diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a768781..81e6797f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes for Feed Me +## Unreleased + +- Fixed an error that would occur when running a feed with the backup database setting enabled, when Craft's `backupCommand` was set to false. ([#1461](https://github.com/craftcms/feed-me/pull/1461)) + ## 6.1.0 - 2024-05-26 - Added Craft Commerce 5 compatibility. ([#1448](https://github.com/craftcms/feed-me/pull/1448/)) diff --git a/src/services/Process.php b/src/services/Process.php index 57e795c9..ccdf3800 100644 --- a/src/services/Process.php +++ b/src/services/Process.php @@ -644,6 +644,11 @@ public function debugFeed($feed, $limit, $offset, $processedElementIds): void */ private function _backupBeforeFeed($feed): void { + if (Craft::$app->getConfig()->getGeneral()->backupCommand === false) { + Plugin::info('Database not backed up because the backup command is false.'); + return; + } + $logKey = StringHelper::randomString(20); $limit = Plugin::$plugin->service->getConfig('backupLimit', $feed['id']); diff --git a/src/templates/feeds/_edit.html b/src/templates/feeds/_edit.html index ec48800d..ea5296c5 100644 --- a/src/templates/feeds/_edit.html +++ b/src/templates/feeds/_edit.html @@ -21,6 +21,7 @@ {% set title = (feed.id) ? feed.name : 'Create a new feed'|t('feed-me') %} {% set noTabs = true %} {% set fullPageForm = true %} +{% set backupsDisabled = craft.app.config.general.backupCommand is same as(false) %} {% set buttons %}