magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Error DOB field with Locale PT #34130

Closed mohammedTBB closed 2 years ago

mohammedTBB commented 3 years ago

Preconditions (*)

  1. Fresh Magento 2.4.3
  2. Set store-view locale to Portuguese(Portugal)

Steps to reproduce (*)

Admin - Stores - Configuration - General - Locale Options - Set Locale to Portuguese(Portugal) and Save Reindex and clear cache Fornt-end - Create Account Add DOB in customer create GO to customer/account/create/

Expected result (*)

magento-DOB

Actual result (*)

The actual page:

Magento-error

System.log Error:

`main.CRITICAL: TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given in /var/www/html/magento2/vendor/magento/module-customer/Block/Widget/Dob.php:425 Stack trace:

0 /var/www/html/magento2/vendor/magento/module-customer/Block/Widget/Dob.php(425): iterator_to_array()

1 /var/www/html/magento2/vendor/magento/module-customer/view/frontend/templates/widget/dob.phtml(27): Magento\Customer\Block\Widget\Dob->getTranslatedCalendarConfigJson()

2 /var/www/html/magento2/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/m...')

3 /var/www/html/magento2/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render()

4 /var/www/html/magento2/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView()

5 /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php(1114): Magento\Framework\View\Element\Template->_toHtml()

6 /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php(1118): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()

7 /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php(678): Magento\Framework\View\Element\AbstractBlock->_loadCache()

8 /var/www/html/magento2/vendor/magento/module-customer/view/frontend/templates/form/register.phtml(58): Magento\Framework\View\Element\AbstractBlock->toHtml()

9 /var/www/html/magento2/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/m...')

10 /var/www/html/magento2/vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php->render()

11 /var/www/html/magento2/vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView()

12 /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php(1114): Magento\Framework\View\Element\Template->_toHtml()

13 /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php(1118): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()

14 /var/www/html/magento2/vendor/magento/framework/View/Element/AbstractBlock.php(678): Magento\Framework\View\Element\AbstractBlock->_loadCache()

15 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()

16 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock()

17 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

18 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()

19 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()

20 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

21 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()

22 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()

23 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

24 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()

25 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()

26 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

27 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()

28 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()

29 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

30 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()

31 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()

32 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

33 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement()

34 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()

35 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement()

36 /var/www/html/magento2/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout->renderElement()

37 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()

38 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent()

39 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception{closure}()

40 /var/www/html/magento2/generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout\Interceptor->___callPlugins()

41 /var/www/html/magento2/vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()

42 /var/www/html/magento2/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render()

43 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult()

44 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent()

45 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}()

46 /var/www/html/magento2/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(23): Magento\Framework\View\Result\Page\Interceptor->___callPlugins()

47 /var/www/html/magento2/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult()

48 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()

49 /var/www/html/magento2/pub/index.php(29): Magento\Framework\App\Bootstrap->run()`


m2-assistant[bot] commented 3 years ago

Hi @mohammedTBB. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


: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, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

tyago343 commented 3 years ago

Im still got this error in magento 2.4.3

m2-assistant[bot] commented 3 years ago

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:

engcom-November commented 3 years ago

Verified the issue on Magento 2.4-develop branch and the issue is reproducible: Steps to reproduce: Admin - Stores - Configuration - General - Locale Options - Set Locale to Portuguese(Portugal) and Save Reindex and clear cache Fornt-end - Create Account Issue: UI page is broken image

var/log/debug.log: [2021-09-21 08:29:21] main.CRITICAL: TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given in /var/www/html/magento2.4/magento2/app/code/Magento/Customer/Block/Widget/Dob.php:425

github-jira-sync-bot commented 3 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1308 is successfully created for this GitHub issue.

m2-assistant[bot] commented 3 years ago

: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.

AZiniukhin commented 3 years ago

@magento I am working on this

sidolov commented 2 years ago

Hi @mohammedTBB. Thank you for your report. The issue has been fixed in magento/magento2#34148 by @AZiniukhin in 2.4-develop branch Related commit(s):

The fix will be available with the upcoming release.