From 50ec6daf181dce10d1fe67ea6b7cad86cb71e0c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Benusa Date: Wed, 11 Oct 2023 11:07:40 -0500 Subject: [PATCH 1/2] Added check for simple arrays for newValues within existingValues --- src/helpers/DataHelper.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/helpers/DataHelper.php b/src/helpers/DataHelper.php index 7f2a7a51..57b1ed15 100644 --- a/src/helpers/DataHelper.php +++ b/src/helpers/DataHelper.php @@ -264,6 +264,12 @@ public static function compareElementContent($content, $element) $newValue = null; } + // If array key & values are already within the existing array + if (is_array($newValue) && is_array($existingValue) && Hash::contains($existingValue,$newValue)) { + unset($trackedChanges[$key]); + continue; + } + // Check for simple fields first if (self::_compareSimpleValues($fields, $key, $existingValue, $newValue)) { unset($trackedChanges[$key]); From bd2e6fceda1dc99c537b008bc1513a3e296184c7 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 24 Nov 2023 18:49:44 -0800 Subject: [PATCH 2/2] changelog for https://github.com/craftcms/feed-me/pull/1370 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3121b4d..fd7d03ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed a bug where you could not override feed settings with `false` if you used a `config/feed-me.php` config file. ([#1352](https://github.com/craftcms/feed-me/issues/1352)) - Fixed a bug where `queueTtr`, `queueMaxRetry`, and `assetDownloadCurl` settings were being ignored if you used a `config/feed-me.php` config file. ([#1356](https://github.com/craftcms/feed-me/issues/1356)) - Fixed a PHP error that could occur when importing into a relational field inside of Super Table under certain circumstances. ([#1364](https://github.com/craftcms/feed-me/issues/1364)) +- Fixed a bug where importing Address data from the Google Maps plugin could cause duplicate Addresses if the Address already existed. ([#1370](https://github.com/craftcms/feed-me/pull/1370)) ## 4.7.0 - 2023-07-06