feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Unable to clear relationship data

Open ThomasDeMarez opened this issue 3 years ago • 1 comments

Description

When importing data to a relationship field Feed Me does not remove the linked entry/category when the feed specifies an empty relationship.

Steps to reproduce

As shown in the screenshots below; The field "Academiejaar" will be the example. Here it already contains content. Screenshot 2021-04-01 at 11 22 09

In our feed the key academic_year is empty Screenshot 2021-04-01 at 11 24 23

The setup for Feed Me Screenshot 2021-04-01 at 11 25 35

The logs after import. Here we don't even see the field being processed. Screenshot 2021-04-01 at 11 38 18

But if we change the value to a different academy year, feed me does update to the correct value Screenshot 2021-04-01 at 11 37 47

Additional info

  • Craft version: 3.6.3
  • PHP version: 7.3.27
  • Database driver & version: MySQL 5.7.25
  • Plugins & versions: Feed Me 4.3.4

ThomasDeMarez avatar Apr 01 '21 09:04 ThomasDeMarez

My guess it's the same issue as https://github.com/craftcms/feed-me/issues/797 where blank fields in the incoming JSON are ignored.

nickdunn avatar Nov 17 '21 11:11 nickdunn

This should be resolved with the new “Set Empty Values” setting added in Feed Me 4.6.0 (Craft 3) and 5.1.0 (Craft 4) (https://github.com/craftcms/feed-me/pull/1228).

tommysvr avatar Jun 27 '23 02:06 tommysvr