0

While opening Sales->Order Grid in magento backend, i am getting this issue -

No region found within the locale 'shi'

I have searched for the solution but nothing to work for my case. If anyone have the idea to resolve that would be appreciated. Thanks

a:5:{i:0;s:39:"No region found within the locale 'shi'";i:1;s:5148:"#0 /home/vulgarci/public_html/vc/lib/Zend/Currency.php(103): Zend_Currency->setLocale('shi')
#1 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Model/Locale.php(614): Zend_Currency->__construct('shi')
#2 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php(63): Mage_Core_Model_Locale->currency('shi')
#3 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php(128): Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency->render(Object(Mage_Sales_Model_Order))
#4 /home/vulgarci/public_html/vc/app/design/adminhtml/default/default/template/widget/grid.phtml(161): Mage_Adminhtml_Block_Widget_Grid_Column->getRowField(Object(Mage_Sales_Model_Order))
#5 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(241): include('/home/vulgarci/...')
#6 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#7 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#8 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#9 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#10 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#11 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#12 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(77): Mage_Core_Block_Abstract->getChildHtml('grid')
#13 /home/vulgarci/public_html/vc/app/design/adminhtml/default/default/template/widget/grid/container.phtml(36): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
#14 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(241): include('/home/vulgarci/...')
#15 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#16 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#17 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#18 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
#19 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Widget_Container->_toHtml()
#20 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#21 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#22 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#23 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#24 /home/vulgarci/public_html/vc/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
#25 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(241): include('/home/vulgarci/...')
#26 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#27 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#28 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#29 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#30 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#31 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#32 /home/vulgarci/public_html/vc/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(95): Mage_Core_Controller_Varien_Action->renderLayout()
#33 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->indexAction()
#34 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#35 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#36 /home/vulgarci/public_html/vc/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#37 /home/vulgarci/public_html/vc/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#38 /home/vulgarci/public_html/vc/index.php(87): Mage::run('', 'store')
#39 {main}";s:3:"url";s:75:"/vc/index.php/admin/sales_order/index/key/087ad6c12b1cd570b8518e888b7bbf01/";s:11:"script_name";s:13:"/vc/index.php";s:4:"skin";s:5:"admin";}
1

I have also this exact problem with currency 'Eur'.

It is in a test environment.

Probably went something wrong with my last test order.

When I removed this order (with a php program) this problem was solved.

Edit:

My problem was with orders and payment methods (now both solved) that my upgrade from 1.5 to 1.9 went right except for the valuta settings in admin (no 'Euro' but Afghan..), another time I have done this upgrade (still testing) I did not have this problem, yes that is Magento, it takes all your time .. up to the next errors ..

0

This occurs because the wrong currency was added to the order. Im not sure exactly how the currency was added or if its done through a third party module / programatically.

To see this, check the table sales_flat_order_grid and check the columns base_currency_code and the order_currency_code. Assuming the locale "shi" is currency "Moroccan Dirham", then one or both of the columns should have the value MAD instead of shi. The same will apply to the sales_flat_order table.

I ran a simple test:

Test 1: (Failed)

<?php
require_once('app/Mage.php');
umask(0);
Mage::app();

$c = new Zend_Currency;

$c->setLocale('shi');

Mage::log($c);

Output:

Fatal error: Uncaught exception 'Zend_Currency_Exception' with message 'No region found within the locale 'shi''

Test 2: (Successful)

<?php
require_once('app/Mage.php');
umask(0);
Mage::app();

$c = new Zend_Currency;

$c->setLocale('shi_Tfng_MA');

Mage::log($c);

Output:

2015-05-10T11:12:01+00:00 DEBUG (7): Zend_Currency Object
(
    [_options:protected] => Array
        (
            [position] => 8
            [script] => 
            [format] => 
            [display] => 2
            [precision] => 2
            [name] => adrim n lmɣrib
            [currency] => MAD
            [symbol] => 
            [locale] => shi_MA
            [value] => 0
            [service] => 
            [tag] => Zend_Locale
        )

)

So in short, make sure the correct locale is set to shi_MA and the currencies in the table are set to MAD

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.