Hi
I've a 1200 lines file to import, I encounter a lot of such errors and can't figure why...
For instance, when parsing these two lines ("|" being my fields separator and "¤" the text separator) :
||¤Equipement 19 Rack¤|
||¤Câbles pour patchs¤|The first one goes well and the second doesn't giving me an error message on the parent item of the previous line...
Anyone to help?
Comments
Comment #1
tahiticlic commentedI've bypassed the test leading to this error, all terms are presents but indeed some are at the wrong position... I shall move them, It's not solved but I have my vocab initialized at least.
Well, as I supposed, there's a problem during parsing and the process looses the parent. As I saw, errors occur on the restart points : when I look at the progress bar, each time there's a progress, there's an error and the process makes terms orphans...
[Edit] The batch process leads to such an error when progressive mode is enabled. Non progressive mode is ok. I think the static variable
$previous_imported_lineis not correctly handled during the batch slices changes.[/Edit]Comment #2
Daniel_KM commentedHi,
"||¤Equipement 19 Rack¤|" and "||¤Câbles pour patchs¤|" (which mean in a more used format csv : ,,"Equipement 19 Rack", and ,"Câbles pour patchs", ) are used to import structure with one term by line method. Currently, multistep import is not compatible with one line by term import. Next version (4.3) will do it.
Regards,
Daniel Berthereau
Knowledge manager
Comment #3
tahiticlic commentedYes, I've tried a different format for the test. even with the simplest format it failed.
Well, I didn't say I was on a multistep process which I saw it failed differently indeed. The multistep checkbox is unchecked here...
As I wrote, the problem is in the batch process, which looses the parent term on slices changes (when the progress bar is updated). I have never use the batch process, so I can't tell more precisely what the solution is, but if you make it progressive=FALSE, the process goes well. I think there's a problem on the value of the previous line, but I can't go further.
Maybe it's linked also to the format I took, with ",,term3,' instead of "term1,term2,term3", but I thought it was possible for a hierarchical vocab. If not, you should precise it in the documentation.
Comment #4
Daniel_KM commentedHi,
When you import a line without a first item, one of previous lines need to have previous items. In your example, i don't understand what is the parent of the term ¤Equipement 19 Rack¤. In one of previous lines, you need set it, by example:
.
In this case, ¤Equipement 19 Rack¤ has ¤Accessoires¤ as a first level parent and ¤Electronique¤ as a second level parent and ¤Electronique¤ is the highest level term. I'm going to add in the documentation that a first level item is always needed.
Regards,
Daniel Berthereau
Knowledge manager
Comment #5
tahiticlic commentedHi,
yes my csv file is constructed like that. I've tried to attach it here, but that leads to an error (maybe this is the file I need to exorcize!!!).
I give you the entire sequence from the master level corresponding to the lines I put previously :
This is one main term, there's a lot, so I've had the time to observe the process of import, with the progress bar (no multistep, just the batch progressive process) and every update to this bar lead to an error where the parent term was lost...
What I did to confirm that it was the progressive operation that messed up was to set
batch['progressive'] = FALSE;in includes/forms.inc, line 2499 (I've tried to force the value externally to avoid this temporary hack, in vain). This hack written, the process worked correctly and I had no error at all.Regards,
cfab
Comment #6
Daniel_KM commentedHi,
I can import your file without problem and I can't replicate your bug, but i'm going to add progressive setting in the next version, as it seems to have no bad effect and it can resolve yours.
I've try your file on Taxonomy csv 4.2, as it resolves some memory error and your problem is perhaps a memory problem.
Your remark make me find a bug in text area import with one term by line import (but not with file import). Thanks for your comments.
Regards,
Daniel Berthereau
Knowledge manager
Comment #7
tahiticlic commentedOk, in my case, textarea import leads to the same problem.
Maybe it's my config, the problem is still present with 4.2
As I've found a solution (not really convenient, but it works), it's not a problem anymore for me.
Thanks for this very useful module!
cfab
Comment #8
Daniel_KM commented