Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to import per language #122

Closed
indigoxela opened this issue Aug 19, 2022 · 5 comments · Fixed by #123
Closed

Impossible to import per language #122

indigoxela opened this issue Aug 19, 2022 · 5 comments · Fixed by #123
Labels

Comments

@indigoxela
Copy link
Member

indigoxela commented Aug 19, 2022

Backdrop differs quite a bit re entity keys and translation abilities.

Struggling with it. At first sight I thought it's the usual language/langcode mixup as suggested in #105, but it goes beyond that.

It's currently not even possible to select a language other than neutral, if i18n isn't installed.

@indigoxela
Copy link
Member Author

With #123 applied I got the language aware import working with nodes. We need to test taxonomy terms, too.

@indigoxela indigoxela added the bug label Aug 19, 2022
@indigoxela
Copy link
Member Author

Things to verify: is "translation" the right key for all entity types? My assumption is based on:

@indigoxela
Copy link
Member Author

Testing is a bit complex. My setup might give some hints:

  • On another site I created a view to export a feed of (translatable) nodes
  • The same nodes I wanted to import in a Backdrop site (but the langcode should be kept)

The settings (roughly):

  • Attached to: none
  • Periodic import: off
  • Import on submission
  • HTTP Fetcher
  • Download content from a URL.
  • Common syndication parser
  • Parse RSS and Atom feeds.
  • Node processor
  • Create and update nodes.

There's no way to set a "dynamic" language with RSS (same as in Drupal IIRC), so I created two importers - one for each language.

@herbdool
Copy link
Collaborator

Now that I've merged your PR to get tests running they're running on this one. As expected many still don't work but shouldn't stop this one from being merged. (I won't be able to look more closely for a couple weeks so someone else could)

@herbdool
Copy link
Collaborator

It looks pretty legit. translation is always assigned in https://github.com/backdrop/backdrop/blob/1.x/core/modules/entity/entity.module#L348.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants