title: drupal 7 response with two sets of html, a normal, followed by an in-maintenance with an error message
body: <p>I have a weird problem on my localhost devop preventing me from updating drupal.
  <strong>problem</strong>
  Every page is served with two sets of html</p>
  <pre><code>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; ...&gt;
     &lt;body class=&quot;html front ...&quot;&gt;
        ...
     &lt;/body&gt;
  &lt;/html&gt;
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;
      &lt;body class=&quot;maintenance-page in-maintenance no-sidebars fluid-width&quot;&gt;
         ...
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <ul>
  <li>where the second page is a rendering of the maintenance page</li>
  </ul>
  <p>** 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</p>
  <p><strong>context</strong></p>
  <ul>
  <li><p>the problem is not theme related becaus it does this for every theme</p>
  </li>
  <li><p>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</p>
  </li>
  <li><p>the only difference is an  error i get on my local devop</p>
  </li>
  </ul>
  <p><code>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-&gt;limitGranularity() </code></p>
  <ul>
  <li><p>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...</p>
  </li>
  <li><p>the only other occurence of this problem with someone else i could find here
  <a href="https://drupal.stackexchange.com/questions/269926/maintenance-page-being-rendered-as-an-entire-page-load-after-the-main-page-load">https://drupal.stackexchange.com/questions/269926/maintenance-page-being-rendered-as-an-entire-page-load-after-the-main-page-load</a></p>
  </li>
  </ul>
  <p><strong>Question</strong>
  Does this problem ring a bell for someone.
  Has anybody seen this before?</p>
  <p><a href="https://i.stack.imgur.com/0eFVM.png" rel="nofollow noreferrer">how it looks in garland</a></p>