Skip to content

Commit 18cb71a

Browse files
authored
Better error handling when store is disabled (#1446)
1 parent 0e2f81d commit 18cb71a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/code/core/Mage/Core/Controller/Varien/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public function preDispatch()
496496

497497
// Prohibit disabled store actions
498498
if (Mage::isInstalled() && !Mage::app()->getStore()->getIsActive()) {
499-
Mage::app()->throwStoreException();
499+
Mage::app()->throwStoreException(Mage::helper('core')->__('The store view #%d is disabled.', Mage::app()->getStore()->getId()));
500500
}
501501

502502
if ($this->_rewrite()) {

app/code/core/Mage/Core/Model/App.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,9 +1430,9 @@ public function getUpdateMode()
14301430
return $this->_updateMode;
14311431
}
14321432

1433-
public function throwStoreException()
1433+
public function throwStoreException($text = '')
14341434
{
1435-
throw new Mage_Core_Model_Store_Exception('');
1435+
throw new Mage_Core_Model_Store_Exception($text);
14361436
}
14371437

14381438
/**

app/locale/en_US/Mage_Core_LTS.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
"The store code may contain only letters (a-z), numbers (0-9), underscore(_) or dash(-), the first character must be a letter","The store code may contain only letters (a-z), numbers (0-9), underscore(_) or dash(-), the first character must be a letter"
22
"Admin","Admin"
33
"Frontend","Frontend"
4+
"The store view #%d is disabled.","The store view #%d is disabled."

0 commit comments

Comments
 (0)