Closed (fixed)
Project:
Node import
Version:
5.x-1.7
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2008 at 18:52 UTC
Updated:
1 Nov 2008 at 08:12 UTC
I have several fields that should be left empty (NULL in SQL). But the module writes a zero in every field that is left empty. How could I avoid this?
Thank you in advance!
Comments
Comment #1
wflorian commentedI guess it has something to do with the following lines of code in node_import/supported/cck/content.inc:
What to edit, so that there will be a NULL value when there is no entry in the csv...?
Comment #2
wflorian commentedNobody any idea? It is actually really urgent.
The problem seems to occur only with cck created decimal fields.
I already tried so much with no efforts. I am actually not good enough for writing own php code..
I would be really thankful for any ideas and hints...
Florian.
Comment #3
Robrecht Jacques commentedThere is a problem with node_import and empty values. Empty values are considered not present.
In your case it seems that the code converts an empty string to a 0. This is probably because of
in
supported/cck/content.inc.Could you try if replacing the code above with:
But: because node_import assumes empty strings are "special" (non-mapped values), there might be other places where the conversion takes place unknowingly.
Please test and get back.
BTW: please test with node_import-5.x-1.7 release earlier today.
Comment #4
wflorian commentedHey Jacques,
you made my day!!
Thank you, thank you, thank you! :D
Your code suggestions worked absolutely fine! Thanks a lot, again!
Greetings from Germany.
Florian
Comment #5
Robrecht Jacques commentedComment #6
Robrecht Jacques commentedCommitted. Will be included in the next release of node_import (5.x-1.8) release later this weekend.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.