Mage :: application () & # 8594; setCurrentStore (Mage_Core_Model_App :: ADMIN_STORE_ID); leads to fatal error

The Magento extension I installed has a line of code that leads to a fatal error. I am using Magento 1.8.0, and when I delete this line, everything works as expected.

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

Can someone explain what this line of code does and why it is needed in the extension. After I commented on this line, everything works fine, and I could not find any problem, but I am a little injured that the problem will arise later.

Here's what the syslog file does:

2014-08-27T21:10:13+00:00 ERR (3): Warning: include(Mage/Default/Helper/Data.php): failed to open stream: No such file or directory  in /homepages/11/d460572798/htdocs/magento/lib/Varien/Autoload.php on line 93
2014-08-27T21:10:13+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Default/Helper/Data.php' for inclusion (include_path='/homepages/11/d460572798/htdocs/magento/app/code/local:/homepages/11/d460572798/htdocs/magento/app/code/community:/homepages/11/d460572798/htdocs/magento/app/code/core:/homepages/11/d460572798/htdocs/magento/lib:.:/usr/lib/php5.4')  in /homepages/11/d460572798/htdocs/magento/lib/Varien/Autoload.php on line 93

I am a complete newbie to Magento programming.

+4
source share
1

, Magento

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

Magento id zero . Frontend . , . - 0 .

, , - , -. , ​​ ( ). .

, , . , . , , , . .

, , - ( " " ).

, , extesnion:)

+6

All Articles