- ππΊHungary szato
Updated patch #6 for 8.x-1.x, works for me on Drupal 10.3.x.
My opinion is that the unpublish feature should not be included. It's not related to the "selecting unique field" feature.
- ππΊHungary szato
Patch file: update-based-on-selected-field.3069113-10_0.patch is the correct one.
- π©π°Denmark ressa Copenhagen
Thanks @szato, your patch update-based-on-selected-field.3069113-10_0.patch works well.
- π©π°Denmark ressa Copenhagen
I am adding sections in the Issue Summary, and images to show case the new functionality.
- π©π°Denmark ressa Copenhagen
Just as a FYI, I created a feature request β¨ Add support for creating nodes from pasted content Active as a child issue of this issue, since landing the new features first, would be the right order of things.
- π¨π¦Canada rustyco
Great patch, but I wonder if a change is still possible.
My application becomes much more difficult because of required fields.
I'd like to be able to specify only the field(s) to be modified, plus of course the unique identifier, without re-inserting required fields which don't need to be updated.My case involves price changes from exterior catalogs. The exterior catalog has a unique ID for every item in it, and I've got that ID on my database. But the Title field on my database is different, and better for my purposes, than the exterior catalog item description.
All I want to update is the Price. I had some required fields such as Units, and I've made them not required. But of course the 'title' field is always required, and you can't specify a default value for the content type's Title. - π©π°Denmark ressa Copenhagen
@rustyco You could consider using Drupal core Migrate module with Migrate Plus and Migrate Tools instead, or Feeds β ?
The beauty of this module is the simplicity. Unless your feature is easy to add, though it sounds complicated. I just fear it could stall this issue, and the improvements it provides ...
Here's a re-roll of the patch in Gitlab.
- π¨π¦Canada rustyco
It could indeed be complicated internally; I don't know. Thanks for the kind suggestions; I should have thought of Feeds.
- πͺπΈSpain akalam
I'm rerolling the patch against 2.x release. I'm including a fix regarding the BOM issue, because is a blocker in order to take the unique_identifier in account if that field is the first column in the csv. I'm taking this solution https://www.php.net/manual/en/function.fgetcsv.php#122696
- π©π°Denmark ressa Copenhagen
Thanks @akalam, but maybe you can update the existing MR? You may need to click Get push access β first.
- π©π°Denmark ressa Copenhagen
So, I tried and failed to switch to the new 2.x branch ... Someone needs to fix this via the command line, or we should create a new issue from 2.x:
Creating issue forks > Pulling in new branches from an issue fork's parent β
- First commit to issue fork.
- πΊπΈUnited States edwardsay
Conflicts were resolved, and the patch can be applied to 2.x version of the module
https://git.drupalcode.org/project/csv_importer/-/merge_requests/18.patch