cosmocode / dokuwiki-plugin-struct

A new structured data plugin
https://www.dokuwiki.org/plugin:struct
GNU General Public License v2.0
40 stars 40 forks source link

CSV import not working for lookup fields in schemas #357

Open macneurolab opened 6 years ago

macneurolab commented 6 years ago

The CSV import does not import any fields that are defined as lookup types. To show the issue, try importing items to a field that is defined as lookup type in either a Page or Lookup schema. This happens even if the imported items are identical to those already defined in the lookup schemas targeted by the lookup field.

annda commented 5 years ago

I can't reproduce the issue. Can you give us more details? Including your schemas and a sample CSV that fails to be imported correctly.

macneurolab commented 5 years ago

The issue is that you can’t import the actual values. You need to import the numbers that correspond to the lookup fields, which is not very practical.

splitbrain commented 5 years ago

Note: #352 has some code that might help with implementing this.

Juergen-aus-Zuendorf commented 3 years ago

I'm a bit desperate:

I don't know what the exact syntax in the CSV file must be for this. All my attempts fail, no matter how many quotation marks and brackets I set and how I specify the row number.

Here is my test file with only one item:

pid,cms-akat-matnr,cms-akat-benenn-de,cms-akat-benenn-en
["redaktionssystem:lookup:cms_akat_benenn",1],"[""75677602"",1]","[""Zwischenstück"",1]",["""",1]

The type of all fields of the lookup schema "cms_akat_benenn" is "text".

Can someone give me a hint for this?

Best regards Juergen