feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Unable to import multi language Tags

Open Friksel opened this issue 4 years ago • 3 comments

Description

We can import tags and let them create if they don't exist. But there seem to be no way to add a translation to an already existing tag as we are unable to set a reference, like an ID, during import on that tag. Which would make a mess of all tags, as translated tags will be recreated and don't have any relation to their original tag anymore. And also after importing two languages there are twice as many tags where every tag only has one language.

That's obviously not what we're after, makes a lot of things overly complicated, different per language and errorprone. For example if we remove a tag from one language it should also be removed from other languages. The same goes for editing tags. Also trying to figure out related entries based on tags should never give a different result on different languages.

Steps to reproduce

  1. Import entries for language A with tags for language A
  2. Import entries for language B with tags for language B
  3. See that there is no relation anymore between tags for language A and B. They are now completely seperated own sets of tags, instead of added translations to the original tags

Suggestion

I would expect importing tags should work the same as importing Categories; so I would expect there to be a 'Data provided for this tag is:' and dropdown to select a custom field from the tag, or its ID for example to reference a tag to append the translated data to. I understand tags will be removed from Craft later, but so far they are still here, so it would be nice if we could import them. As they often come with many many many from older CMSses!

Additional info

  • Plugin version: 4.2.3
  • Craft version: 3.4.23

Friksel avatar Jun 12 '20 16:06 Friksel

I've ran into the same issue. My solution ended up being running it as two separate imports, one for each language, but to have a common ID to match against. Then running it as Add & Update, the first run would create tags in the main language, and the second would update the tags with the translated version, for that language (site) only.

The key here is then to have a field on the tag that is translatable, and that there is a field common to match against.

kristiansp avatar Jul 04 '20 11:07 kristiansp

@kristiansp That's exactly how I work on entries and all. All items have a field to synchronise on and I have import feeds for different languages that append to the same items on the synchronise-id (which is a temporary field filled with an ID from the CMS the data is coming from). But even though that works fine on entries, it couldn't be done in Feedme on tags as there is no way to tell Feedme on which field to synchronise a tag to as Categories can.

So in the end I needed to switch to using Categories and use them as tags.

Friksel avatar Jul 07 '20 17:07 Friksel

@Friksel I’m not on my computer at the moment, but I think I edited the feed to update the other site (other language). Or maybe that’s what you also did. Anyways, I did get it to work via two runs. As for me this was a one-time import, that worked fine.

kristiansp avatar Jul 13 '20 09:07 kristiansp