Quantcast
Viewing all articles
Browse latest Browse all 294639

Revisions log on translated nodes should not show original language revisions, should show revisions of translated content

Problem/Motivation

Motivation:
Inconsistent behavior is confusing, and not seeing translation revisions hinders work of editors.

Problem:
Sometimes revisions tab on translated content only shows original source revisions.
This happens when the original source has a published version, before the translation has any published versions.

Proposed resolution

Show translation revisions on translation revisions tab.

Remaining tasks

  • Investigation into cause
  • Write test(s)

Steps to reproduce

8.8.x core, with no contrib modules

Setup

  1. enable content translation (depends on language which will get enabled with it) /admin/modules
  2. enable workflows /admin/modules
  3. enable content moderation /admin/modules
  4. add a language (for example: spanish) /admin/config/regional/language
  5. configure content translation /admin/config/regional/content-language under "Custom language settings" check "Content" and then check the checkbox for Basic Page (leave the default fields checked) and save configuration
  6. configure workflows /admin/config/workflow/workflows/manage/editorial in the "This workflow applies to" section, next to "Content types", click "Select", check Basic Page, save, save

to see expected behavior

  1. add draft english content /node/add/page
    • notice /node/1 has tabs: View, Edit, Delete, Revisions, Translate
    • notice /node/1/revisions has one table row
  2. edit and keep in draft
    • notice /node/1 has tabs: View, Edit, Delete, Revisions, Translate
    • notice /node/1/revisions has two table rows
  3. translate node
    • notice /node/1 has tabs: View, Edit, Delete, Revisions, Translate
    • notice /node/1/revisions has two table row
    • notice /es/node/1/revisions has one table row

to see bug

  1. add draft english content /node/add/page
    • notice /node/1 has tabs: View, Edit, Delete, Revisions, Translate
    • notice /node/1/revisions has one table row
  2. edit and keep in draft
    • notice /node/1 has tabs: View, Edit, Delete, Revisions, Translate
    • notice /node/1/revisions has two table rows
  3. publish
    • notice /node/1 has tabs: View, Edit, Delete, Revisions, Translate
    • notice /node/1/revisions has three table rows
  4. translate node: *set state to draft* as saving translation, as creating the translation see https://www.drupal.org/files/issues/2019-11-05/creating-translation-in-d...
    • notice on save goes to /es/node/2/latest
    • notice /es/node/2/latest has the translation
    • notice /es/node/2/latest has tabs: View, Edit, Latest version, Revisions, Translate
    • notice /es/node/2/revisions *unexpectedly* shows the english three revisions and no spanish revisions
    • notice /node/2/revisions (as expected) shows the english three revisions (and no spanish revisions)
  5. can edit the translation again, now, there are two revisions of the translation, but no way to see them via the Revisions tab

Bit more investigation

we can go back to the first case, and explore the as expected behavior a bit more, where neither is published, and publish the original language node

  1. edit first node, publish
  2. edit translation
    • notice the revisions for the translation show on the translation revision tab /es/node/1/revisions
    • notice the revisions for the original node show on the revisions tab /node/1/revisions

User interface changes

None (?)

API changes

unknown.
(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)

Data model changes

unknown.
(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

Release notes snippet

unknown.
(Major and critical issues should have a snippet that can be pulled into the release notes when a release is created that includes the fix)


Viewing all articles
Browse latest Browse all 294639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>