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

Allow empty string values #1228

Merged
merged 9 commits into from
Feb 10, 2023
Merged

Allow empty string values #1228

merged 9 commits into from
Feb 10, 2023

Conversation

brianjhanson
Copy link
Contributor

Description

Adds a setting to each feed that allows the user to specify if they'd like empty values to used to overwrite existing data. When enabled, empty values be used to set field values.

CleanShot 2023-02-02 at 10 11 50@2x

Related issues

Fixes #797
Fixes #723
Fixes #854

@pixelmachine
Copy link

@angrybrad I think this also resolves #680

@angrybrad angrybrad deleted the feature/empty-string-values branch February 10, 2023 00:34
angrybrad added a commit that referenced this pull request Feb 10, 2023
@angrybrad
Copy link
Member

@pixelmachine seems likely - updated the changelog

@samput
Copy link

samput commented Feb 10, 2023

@angrybrad Is there a way I can require these updates in my composer.json, or do I have to wait until there's a release?

@angrybrad
Copy link
Member

To get the fix early, change your craftcms/feed-me requirement in composer.json to:

"require": {
  "craftcms/feed-me": "dev-v4#e64b0a94bd2eba683e180298ca50cd41cf698b30",
  "...": "..."
}

Then run composer update.

Otherwise, it'll be in the next release, which shouldn't be too far out.

@samput
Copy link

samput commented Feb 13, 2023

Hey @angrybrad I tried installing but I get this error, it doesn't seem to be able to find the branch / tag.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires craftcms/feed-me dev-v4#e64b0a94bd2eba683e180298ca50cd41cf698b30, found craftcms/feed-me[dev-feature/relational-field-default-value-amends-v2, dev-feature/relational-field-default-value-amends, dev-snyk-fix-ef5e5276e3f052b9ab56c0ffe77c5fe6, dev-feature/native-alt-field-support, dev-snyk-fix-beea0a00840935cc102db6b02a1fa0dc, dev-snyk-upgrade-b47a77e6d165438262f217951316421b, dev-snyk-upgrade-0f129540c746121c481a837b82282d0d, dev-snyk-upgrade-3e276e651134916992c762ff6c8ab434, dev-snyk-fix-4efff9a71f7ed5e96637bf2f5c0fa2d0, dev-snyk-upgrade-74e7ca08c9b4d79acf17dac29a94c83b, dev-main, dev-release/5.0.2, dev-develop, dev-bugfix/cms-1199-logged-out-commerce-import, dev-bugfix/commerce-producttype-permission-direct-url, dev-bugfix/1195-use-defaults-if-mapped-val-empty, dev-pullrequests/ivanBereznev/import-multiple-block-types, dev-pullrequests/monooso/order-map, dev-pullrequests/ThomasDeMarez/run-all-feeds, dev-pullrequests/bradlilley/main, dev-pullrequests/boudewijn-zicht/patch-2, 3.0.0-beta.1, 3.0.0-beta.2, 3.0.0-beta.3, 3.0.0-beta.4, 3.0.0-beta.5, 3.0.0-beta.6, 3.0.0-beta.8, 3.0.0-beta.9, 3.0.0-beta.10, 3.0.0-beta.11, 3.0.0-beta.12, 3.0.0-beta.13, 3.0.0-beta.14, 3.0.0-beta.15, 3.0.0-beta.16, 3.0.0-beta.17, 3.0.0-beta.18, 3.0.0-beta.19, 3.0.0-beta.20, 3.0.0-beta.21, 3.0.0-beta.22, 3.0.0-beta.23, 3.0.0-beta.24, 3.0.0-beta.25, 3.0.0-beta.26, 3.0.0-beta.27, 3.0.0-beta.28, 3.0.0-beta.29, 3.0.0-beta.30, 3.0.0, 3.0.1, 3.0.2, 3.0.2.1, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 4.0.0, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.2.0.1, 4.2.1, 4.2.1.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.5.1, 4.3.6, 4.4.0, 4.4.1, 4.4.1.1, 4.4.2, 4.4.3, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.5.4, v4.x-dev, 5.0.0-beta.1, 5.0.0-beta.2, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.x-dev] but it does not match the constraint.

@brianjhanson
Copy link
Contributor Author

Sorry, composer has special requirements for vN branch names. It should be

"require": {
  "craftcms/feed-me": "v4.x-dev#e64b0a94bd2eba683e180298ca50cd41cf698b30",
  "...": "..."
}

@samput
Copy link

samput commented Feb 13, 2023

Thanks @brianjhanson that has fixed the previous error, however I'm now getting a new error as it requires Craft CMS ^3.7.0 I'm currently on version 4.3.8.2. Assuming the v4 branch still needs to support Craft CMS v3.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires craftcms/feed-me v4.x-dev#e64b0a94bd2eba683e180298ca50cd41cf698b30 -> satisfiable by craftcms/feed-me[v4.x-dev].
    - craftcms/feed-me v4.x-dev requires craftcms/cms ^3.7.0 -> found craftcms/cms[3.7.0, ..., 3.7.65.2] but it conflicts with your root composer.json require (4.3.8.2).

@brianjhanson
Copy link
Contributor Author

brianjhanson commented Feb 13, 2023

Sorry @samput, but that looks to be correct. Feed Me v4 requires at least Craft 3.7 as of version 4.4.0

Edit: I should read better. The changes on the v4 branch will get merged into the main branch to bring these features to v5. Unfortunately, that means there's not a great way to get these changes early. A release shouldn't be too far out though.

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

Successfully merging this pull request may close these issues.

5 participants