backdrop-contrib / reference

Defines a field to allow Backdrop entities to reference each other.
GNU General Public License v2.0
4 stars 6 forks source link

Feeds support #51

Open jenlampton opened 3 years ago

jenlampton commented 3 years ago

I am importing content via CSV files and would like to be able to import references. I have a column in my spreadsheet with the node title of the referenced node, and would like the importer to convert that to a nid and save in the reference field.

I'm working on a PR to include this kind of feeds-importer integration.

olafgrabienski commented 3 years ago

I'm not a Feeds and import expert, have done some imports to Drupal 7 with Feeds years ago. That said, wouldn't an import be more robust if it used the ID of the referenced node? While the node ID of a given site is unique, there can be several nodes with the same title which could cause problems.

jenlampton commented 3 years ago

That said, wouldn't an import be more robust if it used the ID of the referenced node? While the node ID of a given site is unique, there can be several nodes with the same title which could cause problems.

Feeds provides the option to list a field as being unique or not so titles can be used as unique identifiers when it's safe.

In my case, the people creating the spreadsheets know nothing about the website, so they are not able to give me a list of node IDs. If you had a spreadsheet with node IDs, you could certainly map those to the reference field and that would be much safer :)