简体   繁体   English

Drupal“找不到页面”错误不断在最近的日志条目中记录

[英]Drupal “page not found” error keeps getting logged in Recent Log Entries

Our website keeps logging a "page not found" error under the Drupal Recent Log Entries, but we do not know where it is coming from. 我们的网站在Drupal最近的日志条目下不断记录“找不到页面”错误,但是我们不知道它来自何处。 When clicking into the detail of the error, the location is marked as "http:///*", user is "Guest", and severity is "warning". 单击错误的详细信息时,该位置标记为“ http:/// *”,用户为“访客”,严重性为“警告”。 Does anybody have ideas on where we can find out what's causing these errors to log? 是否有人对我们在哪里可以找到导致这些错误记录的原因有想法?

do you have atypo error in your code? 您的代码中有atypo错误吗? check if you have mistakenly commented coz i see /* in the link. 检查您是否有误评论,因为我在链接中看到/ *。 This has to be a local error. 这必须是本地错误。 I would check for my drupal_goto calls in my code. 我会在代码中检查drupal_goto调用。 this is my guess and i'm no drupal expert. 这是我的猜测,我不是drupal专家。 let us know if it helps. 让我们知道是否有帮助。 atb! atb!

Page not found warnings like this can be caused every kind of code that triggers an http request, like loading a .js or .css file or an image. 诸如此类的页面未找到警告可能由触发http请求的各种代码引起,例如加载.js或.css文件或图像。 A way to debug this is the quick-and-dirty method described by Lullabot which means that you add a debug_backtrace() at the point where the warning is registered (in your case probably the watchdog() function, see the comment by Randy Fay ). 调试该错误的一种方法是Lullabot描述快捷方法,这意味着您在警告已注册的位置添加了debug_backtrace()(在您的情况下,可能是watchdog()函数,请参见Randy Fay的评论) )。

PS. PS。 @Arvind: If you're using the Drupal API correctly, there shouldn't be too many drupal_goto calls in your code. @Arvind:如果您正确使用了Drupal API,则代码中不应有太多drupal_goto调用。

You might have an issue with your favicon like I did, although I don't recalling it generating errors in my watchdog. 尽管我不记得它在我的看门狗中产生了错误,但您的图标可能像我一样遇到了问题。 It's what triggered a lot of page not founds on my setup. 这是导致我的设置中找不到很多页面的原因。

Basically, you normally put your favicon in your root. 基本上,您通常将图标图标放到根目录中。 However, some browsers ( I believe IE6 ) , don't check the root for your favicon, but your theme folder. 但是,某些浏览器(我相信是IE6)不会检查favicon的根目录,而是检查主题文件夹。 I just duplicated my favicon in my theme folder, and my problem was solved. 我只是在主题文件夹中复制了我的图标,问题就解决了。

Worth a try. 值得一试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM