When I export a term with a komma in the field Description (D7), I get the below message. I suppose this shouldn't be necessary when each field in the export is surround by "-characters.

Errors have been reported during export process. Process failed at term 2 (R2-DC) of a total of 5 [ERROR : Current line contains delimiter, enclosure or unprotected line ending. You need to change them if you want to import correctly a taxonomy.].

Comments

johnv’s picture

Component: Code » User interface

I discovered that you can set the values on 2nd tab, after which the komma's can get exported. I suggest 2 changes in the UI:

1. Please change the following in the message
from : "You need to change them if you want to import correctly a taxonomy."
to: "Change the content of the term, or set appropriate format-settings in tab 2."
2. Your tabs have titles beginning with 'Hide 1.'. etc. In the Import-side, you just show a number, which is better.

Daniel_KM’s picture

Hi,

I have considered your suggestion. I'm going to commit them in the 6/7.x-5.5 release.

I don't understand why your titles begin with "Hide 1". I don't use this word in the module. Perhaps a problem of localization.

Daniel Berthereau
Knowledge manager

johnv’s picture

OK, I'll wait for your next release. I only have one language installed: English.
Kind regards, John

Daniel_KM’s picture

Version: 7.x-5.3 » 7.x-5.5
Status: Active » Needs review

Hi,

I commit your suggestion.

SIncerely,

Daniel Berthereau
Knowledge manager

Daniel_KM’s picture

Status: Needs review » Closed (fixed)

Daniel Berthereau
Knowledge manager

Summit’s picture

Status: Closed (fixed) » Active

Hi, I open this thread again. I got with every setup:

Errors have been reported during export process. Process failed at term 87 (France) of a total of 355 [ERROR : Current line contains delimiter, enclosure or unprotected line ending. Change the content of the term, or set appropriate format settings in second tab.].

I tried "," and ";" and other things, nothing helped to get my terms exported.
Thanks a lot in advance for going into this again.

Greetings, Martijn

Daniel_KM’s picture

Hi,

Which release do you use? What is your term (description, parent...)? Did you try to add a CSV value enclosure?

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Daniel_KM’s picture

Status: Active » Postponed (maintainer needs more info)
Ashlar’s picture

Title: Export term not possible when komma in field 'Description' » Export term not possible when comma in field 'Description'
Category: feature » bug
Status: Postponed (maintainer needs more info) » Active

I am also experiencing this problem. The export process fails due to html coding in a 'description'

My export settings:

CSV format = full term definitions
Vocabulary to export = all vocabularies
CSV value delimiter = (semicolon option)
CSV value enclosure = none
line ending = Microsoft DOS
term order = alphabetical order
show duplicate terms = checked

The error:

Errors have been reported during export process. Process failed at term 29 (042800 Concrete Form Masonry Units) of a total of 467 [ERROR : Current line contains delimiter, enclosure or unprotected line ending. Change the content of the term, or set appropriate format settings in second tab.].

The term:

Title = "042800 Concrete Form Masonry Units"
Description = "includes:

  • 042813 Dry-Stacked, Concrete-Filled Masonry Units
  • 042823 Mortar-Set, Concrete-Filled Masonry Units

"
CSI Title (field 1) = "Concrete Form Masonry Units"
CSI No (field 2) = "042800"

Although it appears to be a problem with 'export' not dealing with an embedded comma, I added commas in other terms and they were processed properly. Als0, this term fails with and without commas in the description body. Additional testing points to the problem being with the embedded html codes. The failure occurs at the first term with these codes and I can cause an earlier failure by inserting the description code with html in an earlier term.

Daniel_KM’s picture

Version: 7.x-5.5 » 7.x-5.x-dev
Status: Active » Closed (fixed)

Hi,

Thanks for your detailled report. It allows me to reproduce your issue.

In fact, your description is multiline, so you need to set a CSV value enclosure (commonly quotation mark "), even if there is no comma.

I 'll change this to default in the next release.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Daniel_KM’s picture

Hi,

I committed the change: default export enclosure is now « " ».

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Summit’s picture

Status: Closed (fixed) » Active

Hi
Opening this again if it is ok.
I have also these errors:

Errors have been reported during export process. Process failed at term 1248 (Duitsland) of a total of 1785 [ERROR : Current line is multiline or contains delimiter, enclosure or unprotected line ending. Change the content of the term, or set appropriate format settings in second tab.].

But only when I use export to Hierarchical tree structure and Fields. Hierarchy structure without fields is working ok.

Sorry if this is unrelated than I close this issue again.

Greetings,
Martijn

Daniel_KM’s picture

Hi,

This is strange. Can I have the full content and fields of this term and its parent?

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Anne-Pierre’s picture

Issue summary: View changes

Hello,
I get an error similar to #1 on a D6 website. On that specific taxonomy vocabulary, I have an Image Taxonomy. I guess this is the reason for my error message.

kenorb’s picture

The same problem here.

[ERROR : Current line is multiline or contains delimiter, enclosure or unprotected line ending. Change the content of the term, or set appropriate format settings in second tab.].

My term contained double-quotes in Description field (e.g. "London Bridge", "London Bridge"). After removing it, it went further.

searchmax’s picture

steniya’s picture

Summit’s picture

Hi, using this for Migration D7 -> D10.
Info from webpage #17
Issue :-
After exporting the data using taxonomy csv module in Drupal, it separates the "description" into different cells treating the comma in the "description" field as the delimiter.
Solution:-
Add htmlspecialchars() in the file taxonomy_csv/export/taxonomy_csv.export.inc in the function taxonomy_csv_term_export().
Replace the line
$result['line'][] = _taxonomy_csv_escape_line_break($item['value']);
with

$result['line'][] = htmlspecialchars(_taxonomy_csv_escape_line_break($item['value']));

Wouldn't it not be better to put this in a patch please?
Greetings, Martijn