Problem with syncing image in translatable entity

Created on 6 February 2024, 11 months ago
Updated 12 April 2024, 8 months ago

Problem/Motivation

Hi, I have a problem with syncing translatable entity having image field. If I add a different image per translation, then only the first one is synced correctly. There is no error in logs.

Steps to reproduce

  1. Create a translatable node.
  2. Add a translatable Image field into it.
  3. Add a node in two translations (i.e. English and Italian), but for the first one upload a different image than for the second one.
  4. Sync this node with Entity Share module (at first English translation, later Italian one).
  5. Check synced node: you should see that for the Italian translation there is no image uploaded (Image field is empty).
🐛 Bug report
Status

Active

Version

3.0

Component

Entity Share Client

Created by

🇵🇱Poland tivi22

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tivi22
  • 🇫🇷France Papa Ours Paris

    I'm having a similar issue with a File field.
    The sites have 2 languages: English and French.
    English is the main language, but for the content generating an issue, French version has been contributed first, so the "Original language" is French.
    When synchronizing the English version first, the "Original language" becomes the English on the slave site and the File field is empty, but the File contributed in the French version of the master content has been synchronized.
    Also, if I first synchronize the English File himself, it is correctly referenced in the English content when synchronized after.

  • 🇩🇪Germany spuky

    I am expierencing the same problem since it was working in Drupal 10 before... it might be caused by a Drupal update

  • 🇩🇪Germany spuky

    I did a little test with setting up 2 new local sites... on ddev...

    main lang german secondary language englisch...
    Default Article content made translateable including Image file...

    exposed the sever via ngronk

    when watching the ngrok traffic insepector i can see that the client is requesting...

    /en/jsonapi/node/article/{uid}/field_image

    which contains the english version of the file...
    but is then fetching the German version of the file..

    also tried upgraded to 4.0.x-dev and it behaves the same...

  • 🇩🇪Germany spuky

    and i dug deeper into the the issue... it seems to be a bug in jsonapi of core...

    https://www.drupal.org/project/drupal/issues/3314636 🐛 Json Api : Translation lost when loading revision with the resourceRevision parameter Needs work

    patch 5 ( https://www.drupal.org/project/drupal/issues/3314636#comment-14738731 🐛 Json Api : Translation lost when loading revision with the resourceRevision parameter Needs work )

    did resolve... the issue for me...

Production build 0.71.5 2024