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

IBX-3265: Fixed translation of User content objects #63

Open
wants to merge 4 commits into
base: 1.3
Choose a base branch
from

Conversation

webhdx
Copy link
Contributor

@webhdx webhdx commented Nov 29, 2022

JIRA: https://issues.ibexa.co/browse/IBX-3265
Requires: ezsystems/ezplatform-admin-ui#2081

Looks like translating User content objects was never working properly. Architecture of Content editing forms is very limiting thus the solution is not perfect. It required a few steps to fix the issue:

  • User object with incorrect language was passed to UserUpdateMapper which prevented displaying an editing form
  • FieldValueValidator was defined as data constraint which had to be changed to form constraint in order to provide more context to the validator. Intuitively you'd use validation groups here but it isn't possible with how we dynamically map fields. Right now the form will define FieldValue constraint with intent option passed as payload. Then the validator itself can detect wether it should skip validation on nontranslatable fieldtypes.
  • Translation has to use it's own intent. Previously we heavily relied on translations being content updates but it was very limiting in places where you can't access Content object to check mainLanguageCode.

@webhdx webhdx added the Bug Something isn't working label Nov 29, 2022
@webhdx webhdx self-assigned this Nov 29, 2022
@sonarcloud
Copy link

sonarcloud bot commented Nov 29, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ViniTou ViniTou requested a review from a team November 30, 2022 09:04
@konradoboza konradoboza requested a review from a team November 30, 2022 09:41
@bogusez bogusez self-assigned this Dec 2, 2022
@bogusez
Copy link

bogusez commented Dec 2, 2022

Regression tests passed: ibexa/commerce#168

@bogusez bogusez removed their assignment Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

6 participants