Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
crjc opened this issue Aug 16, 2023 · 6 comments · Fixed by #15185
Closed

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

crjc opened this issue Aug 16, 2023 · 6 comments · Fixed by #15185

Comments

@crjc
Copy link

crjc commented Aug 16, 2023

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.

@crjc crjc added the type/bug label Aug 16, 2023
@github-actions
Copy link

Hi there @crjc!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@elit0451
Copy link
Member

Hi @crjc 👋

Thanks for the detailed reproduction steps and the initial investigation 💪
I can confirm that when we have a second language, the rollback functionality is not working on invariant fields. We would like some help fixing this, so I will mark it as up for grabs.

@github-actions
Copy link

Hi @crjc,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post.

Thanks muchly, from your friendly Umbraco GitHub bot :-)

@nagolucky18
Copy link
Contributor

I will look at this one.

@pmann1991
Copy link

This still seems to be an issue in v13. Is there an update on this? Looks like the PR was never merged? This is a pretty major flaw IMO and you'd expect it to be fixed way before a whole new major release.

@keithlfs
Copy link

Hi @elit0451 - please review the PR that was added a while back. This is a serious issue that looks to have already been fixed, barring review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants