when changing the Magento Locale to fa_IR
I have already reported this in here
https://github.com/magento/magento2/issues/14068
but it is not accepted as an issue yet
tested on centos 6.x
in the file "vendor/magento/framework/View/Element/Html/Calendar.php" it also stated this
/** * Month names in abbreviated format values was added to ICU Data tables * starting ICU library version 52.1. For some OS, like CentOS, default * installation version of ICU library is 50.1.2, which not contain * 'abbreviated' key, and that may cause a PHP fatal error when passing * as an argument of function 'iterator_to_array'. This issue affects * locales like ja_JP, ko_KR etc. * * @see http://source.icu-project.org/repos/icu/tags/release-50-1-2/icu4c/source/data/locales/ja.txt * @see http://source.icu-project.org/repos/icu/tags/release-52-1/icu4c/source/data/locales/ja.txt * @var \ResourceBundle $monthsData */
I have issues loging in to the admin
after installtion and changing locate to fa_IR
./magento setup:di:compile
and
./magento indexer:reindex
./magento cache:clean
and the same issue on admin panel
`1 exception(s):
Exception #0 (Exception): Recoverable Error: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given, called in /home/mahtoo/public_html/vendor/magento/framework/View/Element/AbstractBlock.php on line 659 and defined in /home/mahtoo/public_html/vendor/magento/framework/View/Element/Html/Calendar.php on line 74
Exception #0 (Exception): Recoverable Error: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given, called in /home/mahtoo/public_html/vendor/magento/framework/View/Element/AbstractBlock.php on line 659 and defined in /home/mahtoo/public_html/vendor/magento/framework/View/Element/Html/Calendar.php on line 74
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(4096, 'Argument 1 pass...', '/home/mahtoo/pu...', 74, Array)
#1 /home/mahtoo/public_html/vendor/magento/framework/View/Element/Html/Calendar.php(74): iterator_to_array(NULL)
#2 /home/mahtoo/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(659): Magento\Framework\View\Element\Html\Calendar->_toHtml()
#3 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml()
#4 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('head.calendar')
#5 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('head.calendar')
#6 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout->renderElement('head.calendar')
#7 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('after.body.star...')
#8 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('after.body.star...')
#9 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(569): Magento\Framework\View\Layout->renderElement('after.body.star...')
#10 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(520): Magento\Framework\View\Layout->_renderContainer('root')
#11 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('root')
#12 /home/mahtoo/public_html/vendor/magento/framework/View/Layout.php(938): Magento\Framework\View\Layout->renderElement('root')
#13 /home/mahtoo/public_html/var/generation/Magento/Framework/View/Layout/Interceptor.php(37): Magento\Framework\View\Layout->getOutput()
#14 /home/mahtoo/public_html/vendor/magento/framework/View/Result/Page.php(243): Magento\Framework\View\Layout\Interceptor->getOutput()
#15 /home/mahtoo/public_html/vendor/magento/framework/View/Result/Layout.php(164): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#16/home/mahtoo/public_html/var/generation/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#17 /home/mahtoo/public_html/vendor/magento/framework/App/Http.php(139): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#18 /home/mahtoo/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#19 /home/mahtoo/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#20 {main}`
I tried changing
/home/mahtoo/public_html/vendor/magento/zendframework1/library/Zend/Locale/Data/fa_IR day and month system but there was no luck
there is a fix but not a correct one because it will not use the correct locale calendar in here
https://github.com/magento/magento2/issues/3541
but the calendar must use the fa_IR
Please help me fix this issue