magento2
magento2 copied to clipboard
Decimal number representation with "," leads to errors in the adminhtml (for e.g. locale: German)
Preconditions and environment
- Magento version 2.4.4-p1
Steps to reproduce
- Login to adminthml
- Make sure your account setting for Interface Locale is "English (United States) / English (United States)"
- Create a Bundle Product with a special price by percentage (e.g. 95)
- Go to the product list (Catalog > Products) and search for the Bundle
- See the Bundle and ensure that it works
- Now, change your account setting for Interface Locale to "Detusch (Deutschland) / German (Germany)"
- Go back to the product list and recognize error message
Expected result
No matter which language for the Interface Locale setting is selected, the product list works.
Actual result
When selecting a language in which the decimal number representation comes with "," instead of ".", the product list does not load and shows the following errors:
Attention
Something went wrong.
Something went wrong with processing current custom view and filters have been reset to its original state. Please edit filters then click apply.
Additional information
See also the exception in the var/log/system.log and debug:
main.CRITICAL: Exception: Notice: A non well formed numeric value encountered in vendor/magento/module-bundle/Ui/DataProvider/Product/Modifier/SpecialPriceAttributes.php on line 80 in vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 vendor/magento/module-bundle/Ui/DataProvider/Product/Modifier/SpecialPriceAttributes.php(80): Magento\Framework\App\ErrorHandler->handler()
#1 vendor/magento/module-catalog/Ui/DataProvider/Product/ProductDataProvider.php(93): Magento\Bundle\Ui\DataProvider\Product\Modifier\SpecialPriceAttributes->modifyData()
#2 vendor/magento/module-ui/Component/Listing.php(38): Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider->getData()
#3 vendor/magento/framework/View/Element/UiComponent/Context.php(250): Magento\Ui\Component\Listing->getDataSourceData()
#4 vendor/magento/framework/View/Element/UiComponent/ContentType/Json.php(69): Magento\Framework\View\Element\UiComponent\Context->getDataSourceData()
#5 vendor/magento/module-ui/Component/AbstractComponent.php(158): Magento\Framework\View\Element\UiComponent\ContentType\Json->render()
#6 vendor/magento/module-ui/Controller/Adminhtml/Index/Render.php(91): Magento\Ui\Component\AbstractComponent->render()
#7 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Ui\Controller\Adminhtml\Index\Render->execute()
#8 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent()
#9 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}()
#10 generated/code/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(23): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins()
#11 vendor/magento/framework/App/Action/Action.php(111): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->execute()
#12 vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()
#13 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()
#14 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callParent()
#15 vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}()
#16 vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()
#17 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->Magento\Framework\Interception\{closure}()
#18 generated/code/Magento/Ui/Controller/Adminhtml/Index/Render/Interceptor.php(41): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->___callPlugins()
#19 vendor/magento/framework/App/FrontController.php(245): Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor->dispatch()
#20 vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#21 vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#22 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#23 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#24 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#25 generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#26 vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#27 generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#28 vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#29 pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#30 {main} [] []
Debugging: In the SpecialPriceAttributes in line 80, you can see how the decimal number representation changes when you change the Interface Locale during debugging. This is the cause of the error.
The language of the interface isn't changed at all. However, this might be another issue.
Release note
No response
Triage and priority
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [X] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @densen45. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
After opening this issue, I looked at the current 2.4-develop code and saw that this issue was already addressed for Dutch language in https://github.com/magento/magento2/commit/39a7cfab9420aa7a16c2de1cc79da2ec12cee561.
Adding 'de_DE' to the introduced LOCALE_USING_DECIMAL_COMMA constant solves this issue for German language too. See here https://github.com/magento/magento2/blob/f26ae808bd9f9164793cb7bc9211d9ac3abb958a/app/code/Magento/Bundle/Ui/DataProvider/Product/Modifier/SpecialPriceAttributes.php#L22 Maybe other languages are effected as well?
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself. -
[ ] 3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! -
[ ] 5. Add label
Issue: Confirmed
once verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @densen45 , Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance with both German(Germany) and French(France) locale options but the issue is not reproducible. Steps performed:
- Locale set to English (United States). Created Bundle product with Special Price in decimal values.
- Locale changed to French (France).
- Clean cache
- Front-end - Catalog - No issue
- Product Details page - No issue
- User is able to place order - No issue.
Kindly recheck the issue on Magento 2.4-develop instance and let us know for which language package the issue is reproducible. Thank you.
@engcom-November Thanks for checking this issue.
I have updated the "Steps to reproduce" above. Please read carefully and notice, it's an adminhtml/backend related issue. You need to change the locale settings in your admin account, not the translation settings in your browser. Later you have to go to the product list in the adminhtml/backend. You don't need to go to the frontend at all.
If anything is still unclear, I'm happy to help.
Thank you for the response @densen45 ,
Verified the issue again on Magento 2.4-develop instance with updated steps and the issue is reproducible. Hence confirming the issue.
Thank you.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6848 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
:x: You don't have permission to export this issue.
Hi @densen45 ,
The issue is not reproducible with the provided steps please fine the screen shots attached for the same.
Hence we are closing this issue.
Let us know if we are missing anything!!!
@engcom-Dash It looks like you didn't follow the sequence of steps to reproduce this issue. Please reopen this issues.
You have to set the the Interface Locale first to "Detusch (Deutschland) / German (Germany)" and open the Products overview afterwards. On your first screenshot the locale is not set to German (e.g. see the button "Add Product").
With Magento 2.4.6 changes according to https://github.com/magento/magento2/issues/35704 were released. As I mentioned above, they implemented this for the Dutch language. It would be pretty easy, to add further effected languages.