未捕获的异常:Mage

编程入门 行业动态 更新时间:2024-10-25 18:27:36
未捕获的异常:Mage_Core_Model_Store_Exception(Uncaught exception: Mage_Core_Model_Store_Exception) Fatal error: Uncaught exception 'Mage_Core_Model_Store_Exception' in /home/mywebsite/public_html/app/code/core/Mage/Core/Model/App.php:1357 Stack trace: #0 /home/mywebsite/public_html/app/code/core/Mage/Core/Model/App.php(842): Mage_Core_Model_App-&gt;throwStoreException() #1 /home/mywebsite/public_html/app/code/core/Mage/Core/Model/App.php(491): Mage_Core_Model_App-&gt;getStore() #2 /home/mywebsite/public_html/app/code/core/Mage/Core/Model/App.php(274): Mage_Core_Model_App-&gt;_initCurrentStore('default', 'store') #3 /home/mywebsite/public_html/app/Mage.php(615): Mage_Core_Model_App-&gt;init('default', 'store', Array) #4 /home/mywebsite/public_html/pricerule.php(6): Mage::app('default') #5 {main} thrown in <b>/home/mywebsite/public_html/app/code/core/Mage/Core/Model/App.php</b> on line <b>1357</b>

编辑 - 解决方案---------------------

我在require_once'app / Mage.php'之后添加了以下行;

require_once 'app/Mage.php'; Mage::app('main');

EDIT -- SOLUTION ---------------------

I added the following line after require_once 'app/Mage.php';

require_once 'app/Mage.php'; Mage::app('main');

where 'main' is my store's code. I have only one store in Magento.

I found this solution in another file I'm using which contains require_once 'app/Mage.php' but doesn't give an error. I don't know why it worked, but it did.

最满意答案

查看堆栈跟踪错误发生在这里:

app / code / core / Mage / Core / Model / App.php(491):Mage_Core_Model_App-> getStore();

你能给我们更多的背景知识吗? 你的网站有用吗? 您最近是否更改了商店设置,例如删除了商店?

如果您使用其他浏览器或其他计算机访问您的网站,那该工作吗?

Cookie用于告诉Magento您要访问的商店,请尝试删除所有Cookie。

还有什么? 可能是XML文件丢失或错误,并且Magento配置无法找到存储设置。

尝试其中一些然后请提供更多背景信息:例如,这是一个新的Magento安装吗? 你可以访问Magento管理页面吗? 这有用吗? 你在制作吗? 德韦; OPMET? 在XAMP上本地运行? 最近改变了你的商店配置? 最近更改或移动了XML文件? 切换到一个新的主题?

I added Mage::app('main'); after require_once 'app/Mage.php';

require_once 'app/Mage.php'; Mage::app('main');

where 'main' is my store's code. I have only one store in Magento.

I found this solution in another file I'm using which contains require_once 'app/Mage.php' but doesn't give an error. I don't know why it worked, but it did.

更多推荐

本文发布于:2023-07-21 09:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1208984.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:异常   Mage

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!