after changing admin language, cannot access admin page

by rtk0407   Last Updated November 10, 2017 08:09 AM

I have installed language extension and successfully installed on my test store. However, as soon as I have changed the admin language and press save, the admin page crashed, giving 500 error and cannot access at all. Frontend is still accessible.

I have deleted cache, but still not working.

I have contacted the developer, but if anyone has any idea how I could fix this, would be really appreciated.

EDIT:

Error Log:

PHP Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given in /vendor/magento/framework/View/Element/Html/Calendar.php:86



Answers 1


Again and again, for the unexpected 500 error, we should enable error reporting on the bootstrap. Should enable error reporting with -1 value. That will report all PHP errors.

Or need to check web server log.

app/bootstrap.php

ini_set('display_errors', -1) // Should enable error reporting with -1 value.

In your case, I'm not sure if it is a Magento bug or not. The locale Data may get the null value. Read more: https://github.com/magento/magento2/issues/5356

A temporary solution, go to this file: vendor/magento/framework/View/Element/Html/Calendar.php line ~65

Replace:

$localeData = (new DataBundle())->get($this->_localeResolver->getLocale());

With:

$localeData = (new DataBundle())->get('en_US');
Khoa TruongDinh
Khoa TruongDinh
January 08, 2017 02:06 AM

Related Questions


Magento 2 Interface Locale issue with en_gb(uk)

Updated July 09, 2018 13:09 PM


M2 - Change admin login language

Updated April 26, 2017 08:09 AM

"Interface Locale" admin language problem

Updated June 03, 2016 08:04 AM

admin dashboard - load other language by default

Updated July 09, 2017 12:09 PM