Active
Project:
Node import
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2009 at 02:42 UTC
Updated:
15 May 2014 at 14:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
seehawk commentedI'm interested in this as well.
If you import multiple value fields that are part of a multigroup, will the values of each field match up so long as you separate multiple values in a consistent fashion?
In other words, if you have three fields in a multigroup, and the goal is to have values like this:
A B C
1 2 3
X Y Z
if you import the first field as "A||1||X", the second as "B||2||Y" and the third as "C||3||Z", will they align properly after the import?
Comment #2
Zidewinder commentedI have been trying to import data into some multigroup fields, and it seems like it all goes fine until the import finishes and I go check the results and see only the first set of values got imported. I'm not sure if this is because it's a multigroup, or if it's a larger issue with importing into multi-value text fields...
Comment #3
legion80 commentedI was working on tracing what's going on a few weeks ago, and then got sidetracked.
Basically what's happening is that if you're trying to do a multigroup import, it is possible for each "column" of the group to have a blank value in the middle. The node import code will (twice?) filter out all values that are empty, so that's one big bug.
I think I remember running into the same problem you did; that is, even if every column in every row has been filled out, it still only saves the first one. That's another bug that I haven't yet located. I have successfully imported multi-value fields, so it's not that-- it has something to do with the fact that multiple columns are part of a multi-group, and that you are saving the multi-group.
in node_import.inc, line 605 and 677 you'll find duplicate if statements that filter the $values variable based on empty strings. I first tried to import by commenting those lines out, but it still didn't work. Then I discovered another bug, in supported/cck/content.inc, lines 108 and 114. What's happening is that it is going through the list of data based on an incrementing index, where $i is defined by the length of the array. This is wrong, since what you want to use is the actual key of the array, not the index of the array. This code worked before since it basically assumed that if you were importing multiple values for a column, each element of the array is filled with a non-empty string. Since we can't assume that anymore, this code breaks.
That's as far as I got. The code still won't work. If anyone else can help with the debugging, hopefully what I described here will help.
I've submitted a patch of what I changed.
Comment #4
amclin commentedI found this thread while trying to figure out why importing CCK multigroups was only saving the first entry and did a bunch of debugging and reading through the code to figure out how this all works and I think I found a solution.
If the CCK multigroup is set to an unlimited number of repeats, then Node Import only imports the first value from the CSV Content Field list of multiple values (even though all the values exist in the data array).
However, if the CCK multigroup is set to a fixed limit of repeats, then things work properly and multiple entries are created for the multigroup.
This also appears to allow for "empty" entries for values within multigroups!
So it seems to me what needs to be fixed is whatever is affected by the multigroup entry limit flag.
Comment #5
tomgf commentedI have exactly this problem and can confirm this: trying to import from a CSV file, the CCK multigroup accepts only the first group ignoring the rest when set to unlimited values. It works fine if there is a fixed limit of values.
Comment #6
bikingbadger commentedI've run into this problem and solved it temporarily with the maximum number of entry's.
Problem is my node needs more than the ten set as the maximum.
Is there any way that I can work around it?
Comment #7
mscalone commentedsubscribe
Comment #8
Anonymous (not verified) commentedsubscribe
Comment #9
zeezhao commentedsubscribe
Comment #10
Anonymous (not verified) commentedThere's a patch to reset the maximum of the multigroup, I haven't tried it yet though:
http://drupal.org/node/841914
Comment #11
anj commentedSubscribe
Comment #12
vacilando commentedI confirm amclin's workaround in #4:
Comment #13
Anonymous (not verified) commentedIs there any work around if most of my repeats will stay under 10, but I have a few that will be 100+?
Comment #14
Anonymous (not verified) commentedThis is really close to a deal breaker for me, I have a whole mess of data. I'll provide a $50 bounty (paypal) for this to work with the multigroup set as unlimited...hope this is okay.
Comment #15
pvanerk commentedI use the Feeds module in combination with the feeds tamper module to get this working.
With the Node Import module didn't get this working.
I have written a blog post on the setup of the Feeds, Feeds Tamper and a bit of VBA code.
Comment #16
Anonymous (not verified) commentedThanks to pvanerk for providing an alternative--of which I am investigating. Am still hoping for this to work out for unlimited multigroups though.
Comment #17
overbythere commentedI am still seeing this as an issue. Not specifically for this module, but I am presuming a module conflict as above. Annoyingly our client has already entered 12 items, so I cannot set the limit to 10. Is it possible to set the limit to 15 for example?
Anyone have any idea if this got fixed, or if a fix is available? Using latest Drupal and CCK.
Thanks,
Dan.
Comment #18
JayBroughton commentedDid this get fixed?
Thanks
Jay