Skip to content

Always resaving items with empty ("") values if compareContent = true and "Set Empty Values" is turned on #1615

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

Closed
brimby opened this issue Mar 28, 2025 · 2 comments
Assignees
Labels

Comments

@brimby
Copy link

brimby commented Mar 28, 2025

Description

If I have "Set Empty Values" turned on, then any item in the feed with an empty string "" causes the import to decide it has changed. Obviously with compareContent = false in the config, it's meant to always resave. But what I'm finding is that even with compareContent = true it still decides the items have changed if they have empty strings even if they always had empty strings before and after the import. If I then turn off "Set Empty Values" they are correctly skipped. But I can't turn off "Set Empty Values" in this particular use case because the client does clear values on the feed. This is slowing down my imports to the point that they are piling up and causing problems. Thanks for looking into it!

Steps to reproduce

  1. Add compareContent = true to the config
  2. Create a feed with "Set Empty Values" on
  3. Load a json file that has empty strings mapped to plain text fields
  4. Observe that every time you run the feed it updates all the entries, even if nothing has changed.

Additional info

  • Craft version: 4.13.5
  • PHP version: 8.2
  • Database driver & version: MySQL 5.7.39
  • Plugins & versions: Feed Me 5.9.0

Not sure if this is related at all, but you guys fixed a bug for me having to do with "Set Empty Values" a couple months ago here #1560

@i-just
Copy link
Contributor

i-just commented Apr 3, 2025

Hi, thanks for reporting! I raised a PR for this.

@i-just i-just self-assigned this Apr 3, 2025
@angrybrad
Copy link
Member

Resolved in #1621 and will be included in the next releases.

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

3 participants