Hello,

I am migrating nodes that have several CCK filefields. However, the node is not saved/updated when the filefields are empty. If all the filefields have a sourcepath, then the node saves/updates ok.

Note that this is occurring for filefields that are not required.

I have tried updating the sourcepath using NULL, blank (' ') and 0 but the node is still not saved.

I'd like to know what do I need to put in sourcepaths that are empty in order for migrate to work ok.

Thanks,

KH

CommentFileSizeAuthor
#2 migrate_extras.patch740 byteswapnik

Comments

davemybes’s picture

I can confirm this problem with empty filefields. The only solution I have at this moment is to import only the nodes that have the field filled in, and then remove it from the mapping and then import the remaining nodes. Not too bad in this case as only 6 nodes have the field filled in. However, its going to be a problem later on, I'm sure. I will look at the code and see if there's a way to ignore empty fields somehow.

wapnik’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new740 bytes

here is the patch
tested on 6.x-1.x-dev

davemybes’s picture

Status: Needs review » Reviewed & tested by the community

Brilliant! Works like a charm. And so simple too.

frankcarey’s picture

Category: support » bug
Status: Reviewed & tested by the community » Fixed

Thanks! Committed to Dev.

Status: Fixed » Closed (fixed)
Issue tags: -empty, -files, -FileField, -filepath, -migrate, -sourcepath

Automatically closed -- issue fixed for 2 weeks with no activity.