Skip to content

Rolling back multilingual content does not work on non varied fields. #14687

@crjc

Description

@crjc

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

11.4.2 (also confirmed on latest 12)

Bug summary

Rollbacks on multilingual content do not revert fields which are configured to NOT vary by culture.

Specifics

It looks like its these conditionals preventing the field from copied:

if (!otherProperty?.PropertyType?.SupportsVariation(culture, "*", true) ?? true)

https://github.com/umbraco/Umbraco-CMS/blob/3a7e388547e3df29bee9bb2649c543c19a1e775a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs#L176C29-L176C29

SupportsVariation returns false from here:
https://github.com/umbraco/Umbraco-CMS/blob/3a7e388547e3df29bee9bb2649c543c19a1e775a/src/Umbraco.Core/Extensions/ContentVariationExtensions.cs#L360C23-L360C23

In my case, culture at this point was "en-us".

Steps to reproduce

New Umbraco Installation
SQL Server or Sqlite

  1. Create document type "Home"
  2. Add a text field "Title".
  3. Enable "Allow as root"
  4. Enable "Allow vary by culture". Ensure Title is still not varied by culture.
  5. Save and close
  6. In settings, configure a second language. Keep the default (en-us). This step is important. If I later delete the second language, rollbacks work as expected.
  7. Create a page using the Home document type.
  8. Save and publish once with the Title as "test1"
  9. Save and publish again with the Title as "test2"
  10. Rollback to the test1 version
    --- the field will still show test2 ---

Expected result / actual result

After the above steps, the field should be 'test1'. But the field does not roll back and stays as test2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions