Don't import data if a field if blank

Closed
ImportWP Pro - WordPress XML & CSV Importer ImportWP Pro - WordPress XML & CSV Importer April 19, 2021
Login to reply
Marco PIERRARD
3 months ago

Hello,

I confirm that the last version of Importwp Pro solved the skipped row issue.

Thank you

Regards

James Collings Support Agent
3 months ago

Hi Marco,

Sorry forgot to let you know there is a new version of importwp pro on codecanyon, if you download that it will fix the skipped row issue you are having.

Marco PIERRARD
3 months ago

Hello,

Thank you very much for this, it's working for importing a the text field directly inside a group acf field and not importing a blank field but those modifications added a bug.

I don't know in which code the problem is but I'm the xml file i'm using to test have two entries, one is a book I want to import (with the right collection filtered by the onix plugin) and the other one is of another collection and it should not be imported.

Before the new code, it was working great but now the first entry is imported (updated with the new functions) but when it's time to read the second entry, the import start a infinite loop.

I have infinite "skipped record" as you can see in the attached image and if I don't cancel the import it goes on forever.

Regards

James Collings Support Agent commented privately
Marco PIERRARD
3 months ago

Hello,

I would like it to be true for all the fields imported.
Some fields go to core post object, others to ACF fields.

Regards

James Collings Support Agent
3 months ago

Hi Marco,

I have had a look into this, i can write a custom function that will check to see if a imported field is empty, and if so it will be skipped, is this to apply to all areas, or the core post object, custom fields, attachments, terms?

James

Marco PIERRARD
3 months ago

Hello,

I use the importer to create and update data inside post.
The file i'm using will not always have data in each field and I don't want the import to overide data the user may have put in the field by deleting it if the data in the import file is blank.

Is there a way to update a fiel only if the value if not empty?

Thank you

Regards