Hi,

when importing nodes with multiple translations some fields do not get imported correctly for translations other than the original one.

The problems I have seen:

  • the uid is not imported correctly, it looks like it's set to the drupal user executing the import command (Anonymous by default);
  • some fields like promote and sticky do not get imported correctly;
  • the created and changed times are set to the time of the import, not to the time in the json file.

As said this is only for the "translations", the entity in the original language seems to be imported just fine.

To replicate this:

  1. create a site with two languages (e.g. English and Italian);
  2. create a node in the default language (setting sticky and promote);
  3. add a translation (look at the created and changed time);
  4. export the node (possibly as user 1, not to loose informations);
  5. delete the content from the site;
  6. import the content;
  7. verify what I wrote above

I am attaching some test content which you can import on a site which have English and Italian languages.
Can you confirm the issue?

Maybe it's a core problem?

Thanks,
Antonio

CommentFileSizeAuthor
translated-content.zip1.98 KBao2

Comments

ao2 created an issue. See original summary.

andypost’s picture

basically that because uid 0 & 1 gets new uuid in each install

ao2’s picture

I don't think it's the same issue, as per my instructions above I also see the issue when importing on the same installation of a site, that is with the same UUID for user 0 and 1.

Also, the test content I attached is about a node authored by uid 2, and the corresponding user has been exported as well in user/ to reproduce it easily.

Thanks,
Antonio

justafish’s picture

I'm also seeing something similar to this - all translations get admin assigned as their author, even though the author is set otherwise in the exported json. Content in the default language imports with the correct user as the author.

justafish’s picture

URL aliases for translations are also not being imported

r.nabiullin’s picture

justafish’s picture

@r.nabiulin this fixes the issue with authors 👍
Unfortunately doesn't fix the issue with URL aliases

r.nabiullin’s picture

@justafish need to debug your problem with aliases, probably the same issue like was with authors