Magento system.log“警告:SimpleXMLElement”-(adminNotification / Model / Feed.php)


12

Magento让我再次陷入困境!在/var/log/system.log中,我看到以下警告,但无法找到原因。按照时间戳记,似乎它们都在同一时间触发,所以也许这是一个特殊的动作,它引发了24行警告...有关如何调试的任何想法?

2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : AttValue: &quot; or ' expected  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : attributes construct error  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : Couldn't find end of Start Tag html line 2  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : Extra content at the end of the document  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:16+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : AttValue: &quot; or ' expected  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : attributes construct error  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : Couldn't find end of Start Tag html line 2  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: Entity: line 2: parser error : Extra content at the end of the document  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: &lt;html lang=en&gt;  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173
2013-07-17T08:06:21+00:00 ERR (3): Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]:            ^  in /home/public_html/app/code/core/Mage/AdminNotification/Model/Feed.php on line 173

Answers:


18

看来是什么东西破坏了adminhtml feed模块。

原因可能是第三方模块正在检索无效的XML。

检查您的站点代码是否包含任何扩展的类Mage_AdminNotification_Model_Feed

找到之后:

  1. 尝试禁用该模块(中的app/etc/modules/)。
  2. 清理system.log。
  3. 查看错误是否消失。

对每个模块重复此过程。确定哪个模块造成了问题之后,您可以对其进行编辑config.xml并注释掉触发通知的观察者。

我还将建议与模块的开发人员联系,并就此问题通知他们。


1
完美,您建议的解决方案效果很好。我为“ AdminNotification” g了一句,当我看到一个特定的模块的xml文件出现时,我立即怀疑了一个特定的模块。我将模块设置为false,重置缓存,注销/登录,问题消失了。从那以后,我已经通过电子邮件发送给模块开发人员来修复其代码。谢谢!
riskywebmaster

对此确实很有帮助+1
Ram Sharma

您还可以使用xdebug在getFeedData方法上添加一个断点,这样,您可以查看是哪个模块导致了断点,而不是如果您使用供稿阅读器使用多个模块,则不禁用它们一一禁用。有用的答案+1
路加福音
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.