Warning icon about unsaved changes and nothing was changed when translating.

Created on 2 November 2020, over 4 years ago
Updated 19 March 2025, 17 days ago

Problem

When translating a node and collapsing a group of Paragraphs a warning icon saying you have unsaved changes appear beside the summary of the Paragraphs.

Steps to reproduce

I've tested this with a default Drupal installation.

  1. Fresh installation of Drupal 8.9.7 with Paragraphs 1.12 module.
  2. Enable translation and add French as a language.
  3. Create a basic paragraph, with just a Text (plain) field, it will do.
  4. Create a new content type and make sure it's translatable.
  5. Add the Paragraphs you created earlier.
  6. Go to Manage form display and use Paragraphs EXPERIMENTAL.
  7. Create a new content using your new content type (in English).
  8. Save it and go to translate the node.
  9. Collapse the Paragraphs group.
  10. The warning icon appears.
πŸ› Bug report
Status

Active

Version

1.12

Component

Experimental Widget

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Pipeline finished with Success
    17 days ago
    Total: 393s
    #451719
  • πŸ‡ΊπŸ‡ΈUnited States kurttrowbridge

    Hello! There are a few issues in the Paragraphs issue queue that have to do with unexpected appearances of the "You have unsaved changes" message, but this one's closest to what I was seeing: that when editing a translation of a node and collapsing Paragraphs, I'd see the message even despite changing absolutely nothing.

    I've provided a merge request that seems to be fixing it for me (I'm using what is now called the "stable" widget), though additional reviews would be great. The issue I found was that in the isChanged() comparison, the original contents were always being loaded in the site's default language, rather than the language being used in the current revision...so they never matched. This update gets the translation from context to make a more accurate comparison.

Production build 0.71.5 2024