-
Notifications
You must be signed in to change notification settings - Fork 29
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
IBX-6833: Copying empty fields during translation copying shouldn't be skipped #390
IBX-6833: Copying empty fields during translation copying shouldn't be skipped #390
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can not wrap my head around it, why storing empty values is somehow breaking our system? How it is handled when you just creating version with empty values?
Also, which of those is not enough so the isCopied
flag is not set to true and you need to pass additional argument?
} elseif (!$isFieldUpdated && $isLanguageNew && !$fieldDefinition->isTranslatable) {
$isCopied = true;
}
@ViniTou The problem is that they are not stored.
The |
Ok, then in which case (outside of copying translation)
I know, it was more about, that maybe we can set it using some other logic to not skip adding without introducing new argument to method signature. |
For example when we are creating a new version in a new language and we are not basing it on another translation so that values are empty.
The
|
tests/integration/Core/Repository/ContentService/CopyTranslationsFromPublishedVersionTest.php
Outdated
Show resolved
Hide resolved
413b7c6
to
1d54c9b
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite a drastic change and we definitely need a solid QA round here to detect possible side effects. I also feel like fields were skipped for a reason but adding them anyway seems like a reasonable solution to keep data integrity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After digging into this deeper, I don't see any apparent issues with this change, though there might be some unforeseen side-effects. Indeed we need to vary that internal method based on either content update or copying fields during publishing, which reuses that method.
Probably more refactoring would be better suited now that we know these operations are actually not the same, but this - what @barw4 did now - seems like the simplest way to achieve it.
I've updated PR description with some extra tips for QA to investigate.
081032f
to
3d412b6
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA approved on Ibexa DXP oss 3.3.x-dev
Description:
When one is copying translations using the
copyTranslationsFromPublishedVersion
method during publishing empty values are left out and not stored in the database which could result in entries not appearing inezcontentobject_attribute
table resulting in missing translations and broken language masks.For QA:
Maintainer note:
Requires extensive multilingual content updating testing, ideally in multiple tabs or even by at least 2 separate editors at the same time (though for that unrelated bugs might occur). Possible regressions: EZEE-2661 but doesn't really require scheduler interaction, rather checking if translations were copied properly.