Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to clear an entry’s asset field #723

Closed
sampsonpete opened this issue Jul 20, 2020 · 3 comments
Closed

Unable to clear an entry’s asset field #723

sampsonpete opened this issue Jul 20, 2020 · 3 comments
Labels

Comments

@sampsonpete
Copy link

Description

I’m importing entries (from a Google Sheet) with an asset field that works fine for assigning images but I can’t seem to clear the field again through the feed import.

I’d imagine that entering an empty string would remove the selected asset but nothing is changed. The previously selected image is still in place after running the feed. I’ve also tried entering null as mentioned in this older issue #213 but it doesn’t make a difference.

Steps to reproduce

  1. Set up Google Sheet import for entries, with an asset field.
  2. Assign an image filename in the spreadsheet, run the feed and confirm the image is selected in Craft.
  3. Delete the image filename in the spreadsheet, re-run the feed and check the entry in Craft. The previous image is still assigned instead of an empty asset field.

Additional info

  • Craft version: 3.4.28.1
  • PHP version: 7.0.32
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions: FeedMe 4.2.3
@grokcodile
Copy link

I am seeing the same issue with importing a JSON feed where a value changes between a string value to null ,or even "", on subsequent imports for the same element. The original value never overwrites with the new blank or null value.

@angrybrad
Copy link
Member

Resolved in #1228

@brandonkelly
Copy link
Member

Feed Me 4.6.0 (Craft 3) and 5.1.0 (Craft 4) have been released with the new “Set Empty Values” setting, which resolves this (via #1228) 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants