简体   繁体   English

drupal 7 响应有两组 html,正常,后跟在维护中,有错误信息

[英]drupal 7 response with two sets of html, a normal, followed by an in-maintenance with an error message

I have a weird problem on my localhost devop preventing me from updating drupal.我的本地主机 devop 上有一个奇怪的问题,阻止我更新 drupal。 problem Every page is served with two sets of html问题每个页面都提供两组 html

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" ...>
   <body class="html front ...">
      ...
   </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
    <body class="maintenance-page in-maintenance no-sidebars fluid-width">
       ...
   </body>
</html>
  • where the second page is a rendering of the maintenance page其中第二页是维护页面的渲染

** what I am looking for** as i spend like 8 hours debugging this, I am at my wits end, and looking for an other perspectives or suggestions **我在寻找什么** 因为我花了大约 8 个小时来调试这个,我束手无策,并寻找其他观点或建议

context语境

  • the problem is not theme related becaus it does this for every theme问题与主题无关,因为它对每个主题都这样做

  • the weird thing is that this local version is an exact copy (code, database, php version, .htacces) of the online production version that does not have this problem奇怪的是,这个本地版本是没有这个问题的在线生产版本的精确副本(代码,数据库,php 版本,.htacces)

  • the only difference is an error i get on my local devop唯一的区别是我在本地 devop 上遇到的错误

TypeError: Argument 1 passed to DateObject::limitGranularity() must be of the type array, null given, called in /Applications/MAMP/htdocs/sontheing/xdev_en_rli_nl/sites/all/modules/contrib/date/date.module on line 255 in DateObject->limitGranularity()

  • Trying to temporarily resolve this error, to see if this is the cause of my weird double html, sends me down a rabbithole patching various date modules.... And I don understand how a type error could have this weird double html rendering result...试图暂时解决这个错误,看看这是否是我奇怪的双 html 的原因,给我发送了一个修补各种日期模块的兔子洞....而且我不明白类型错误如何导致这个奇怪的双 html 渲染结果。 ..

  • the only other occurence of this problem with someone else i could find here https://drupal.stackexchange.com/questions/269926/maintenance-page-being-rendered-as-an-entire-page-load-after-the-main-page-load我可以在这里找到与其他人发生此问题的唯一其他情况主页加载

Question Does this problem ring a bell for someone.问题这个问题是否为某人敲响了警钟。 Has anybody seen this before?有人见过这个吗?

how it looks in garland它在花环上的样子

  • problem 1 - I havent a clue howcome drupal rendered two html pages in the same response, but found the culprit in my case问题 1 - 我不知道 drupal 如何在同一响应中呈现两个 html 页面,但在我的案例中找到了罪魁祸首

  • problem 2 - I traced the problem back to the cron and apache solr, which ultimately crashed on a specific node.问题 2 - 我将问题追溯到 cron 和 apache solr,最终在特定节点上崩溃。 Opening that node it also crashed.打开该节点它也崩溃了。 (Noone ever found that problem because these nodes are rarely viewed, cuase they are mainly historic) so that was the reason the cron crashed The error stemming from the date field (没有人发现这个问题,因为这些节点很少被查看,因为它们主要是历史性的)所以这就是 cron 崩溃的原因 源于日期字段的错误

  • reason 2 - The reason for the page crashing is that drupal tried to render a long text field via the date formatter.原因 2 - 页面崩溃的原因是 drupal 试图通过日期格式化程序呈现长文本字段。 Which is weird because i use the same field in other content types and there it is rendered as a text field.这很奇怪,因为我在其他内容类型中使用了相同的字段,并且它被呈现为文本字段。

  • solution 2 - So, i have not yet discovered why drupal thought that these instances of this text field where date fields, but the solution here was to save the contents of the text fields (I could open the nodes in the editor) then remove the text field from the contenttype, then add a new text field and restore the contents for each node....解决方案 2 - 所以,我还没有发现为什么 drupal 认为这个文本字段的这些实例在日期字段中,但这里的解决方案是保存文本字段的内容(我可以在编辑器中打开节点)然后删除来自内容类型的文本字段,然后添加一个新的文本字段并恢复每个节点的内容....

  • followup 2 - If i can find the reason why drupal thought a text field was a date field I will report that in this thread跟进 2 - 如果我能找到 drupal 认为文本字段是日期字段的原因,我将在此线程中报告

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

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