-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Editing products with mL as units leads to inconsistent behavior with Hungarian locale #12815
Comments
@zsoltiNagy many thanks for opening this issue. To be able to fix this we need to be able to replicate :can you detail what you mean by inconsistent? If you change from ml to mg, what do you get as an inconsistent unit? Do you have this behavior on all products? All enterprises? |
@RachL I'll try best to give you a detailed answer! ->If you change from ml to mg, what do you get as an inconsistent unit? ->Can you translate what the error message means? ->Do you have this behavior on all products? All enterprises? ->Previously, if the error message would not go away it was often because there was a corrupted product. |
Hey @zsoltiNagy , Thanks for reporting! I'm trying to reproduce the issue.
You're trying to change units from mL to mg, so changing from 500 mL you'd like to get 500 mg - do I understand correctly? The picture you share displays the I've tested changing units without the We can see that there is a different logic working and that variants have different
The third row displays an unchanged 500 mL product / variant. I could not get strange or inconsistent behavior on saving the changes, or noticed corrupt products.
I could only reproduce this for the legacy products page; for the new products page, I got 500 g (as shown on the pics). Can you comment on these findings and share your configuration? Many thanks again for your help @zsoltiNagy. |
@filipefurtad0 Thanks for the quick reply and the questions. This morning, I had the opportunity to test this issue more thorougly using the hungarian locale. Here is the configuration I use on my local instance: I realized there are two -probably connected- issues working in tandem, hence the inconsistent behavior that we noticed. -> I change it to Weight(mg) In itself its not a big problem, though combined with the second it can lead to some confusion. Sorry if the issue description was confusing at first and once again thanks for the quick replies! :) |
Unit Scale/"Mértékegység skála", Unit/"Mértékegység" |
Hi @zsoltiNagy , Thanks for your detailed description. I am not able to test this in a staging server with the HU locale, we'd need to provision it with this setting. Given this, I was unable to reproduce the issue:
I think I could test this in a local environment with the |
Hi everyone, I looked into this issue however, I'm not able to reproduce it even with hu locale in the local environment. @filipefurtad0 Please make the following changes in your env files to have the Hungarian config locale working.:
|
@zsoltiNagy - Just a thought:
Do you get the success black banner message below for the first attempt? |
Thanks for your help @chahmedejaz , I had forgotten to change This now worked and I can see the bug: Changing units from 500 to 100 changes the unit scale, from mL to g. But actually it seems, that any change - for example, editing the product name - leads to this as well: It seems this occurs only with units mL. Any change made from a any other unit to mL or on a product/variant which has mL as a unit type will trigger a 422 error on the console. Here is a server log for such a change:
|
Thanks @filipefurtad0, @zsoltiNagy - I've also reproduced the issue, seems like I was also missing a step. Working on its fix. Thanks |
Well done for finding this! I guess this makes it more of an s2? But anyway I see you're on it Ahmed, so probably the severity doesn't change anything at this stage :) |
Sounds right, Rachel. It's only the issue with Hungarian locale, I've found the root cause for this one and will propose the solutions in a while. Thanks |
The fix is ready for review and the solutions have been discussed in the PR. |
Description
I encountered an issue when changing the unit scale in the admin/products section. This action causes inconsistent behavior when using the Hungarian (hun) locale. The bug is problematic because it affects the accuracy of product information displayed to users in this locale, leading to potential confusion or errors in interpreting product data. I was trying to ensure that product units are correctly scaled and displayed according to local preferences, but the inconsistency prevents achieving this objective effectively.
Expected Behavior
Changing unit scales with ease.
Actual Behaviour
When changing unit scales, the modified product banner gets stuck and displays inconsistent results. Additionally, the units change in an inconsistent manner.
Steps to Reproduce
Animated Gif/Screenshot
)
Workaround
Switching admin_style_v3 off
Severity
bug-s3: a feature is broken but there is a workaround
The text was updated successfully, but these errors were encountered: