I am looking for documentation on how to use skip_on_value but I am having trouble finding it.
The README.txt describes what it does. Same as the SkipOnValue.php file. As far as I can tell it is not used in any example. Also the issue in which this feature was introduced (much needed and thanks so far!) #2711949: Migrate Skip on Value (or non Value) there is very little usage information.
So my question is how do I use it? More people are struggling with this #2880413: Process Plugin to get default value from a source field #5 and #6
And specifically I want to ignore rows (of fields) that DON't have a certain value. There seems to be a 'not_equals' config setting, how do I set it?
Finally, if I mange to figure it out, where should an explanation go? In the readme, php file,example or create a documentation page maybe?
Comment | File | Size | Author |
---|---|---|---|
#13 | migrate_plus-skip_on_value_doc_fix-2902867-13.patch | 949 bytes | DuaelFr |
#9 | 2902867-migrate_plus-document-skip_on_empty.patch | 1.51 KB | mr.baileys |
Comments
Comment #2
firfin CreditAttribution: firfin commentedComment #3
heddnAdd a patch with some docs as doxygen. Similar to any of the core process plugins complete with examples.
Here's a general idea of how to use the plugin. The below config should only import blog and page content types. The other content types would be skipped.
The following would skip not the entire row, but just the value and let the rest of content migrate normally. If you want to skip the kittens value from migrating but migrate all the rest, don't use the not_equals to config option. Also note that here the method is process, so we just skip migrating that value, not the entire row as above.
Comment #4
heddnBTW, #3 is untested, so it might be slightly different format, etc. But the general idea applies.
Comment #5
josephdpurcell CreditAttribution: josephdpurcell at Digital Bridge Solutions commentedI have confirmed the examples from #3 will work.
Take note the "skip_on_value" plugin does not support specifying a source field as a value to compare against. I've opened #2916261: Skip when value matches another source value for this purpose.
Comment #6
elamanFor those who is using #3 and can't get it work. Use
empty
instead ofnot_empty
. Tested on 8.x-4.0-beta1.For example (migrate menu from D7 to D8):
Comment #7
ruchi-94 CreditAttribution: ruchi-94 as a volunteer and at Indian Institute of Technology (IIT) Bombay commentedI will volunteering to upload the proper documentation for this issue.
Comment #8
firfin CreditAttribution: firfin commented@elaman I am guessing you mean equals instead of empty?
@ruchi-94: Good luck with your sprint, hope you have time to achieve this!
Comment #9
mr.baileysFirst draft.
Note that I don't think the example given in #3 actually works (due to #2959775: SkipOnValue with multiple configured values and "not_equals" does not make sense.). I did include this use case in the documentation, since whitelisting values seems to be expected behavior, but the patch in #2959775: SkipOnValue with multiple configured values and "not_equals" does not make sense. should get in before this one, otherwise the second example in the plugin's documentation is incorrect.
Comment #10
Miri Meltzer CreditAttribution: Miri Meltzer as a volunteer and commented#6 code - Works perfectly from D6 to D8 also.
on Drupal 8.5.3
Comment #12
heddnDocs are a great improvement. Thanks for the contributions.
Comment #13
DuaelFrHi there! Thanks for this great documentation that helped me figure out how to use this plugin.
I have found a problem, though:
This is not optional!
Here is the patch :)
Comment #15
heddnComment #17
eelkeblok@heddn Could it be that you by accident also committed some or all code for #2902335: Empty array causes entity_lookup to fail in that last commit?