diff --git a/src/view/page/AphrontPageView.php b/src/view/page/AphrontPageView.php index 3a1582ee2a..a064cb29c7 100644 --- a/src/view/page/AphrontPageView.php +++ b/src/view/page/AphrontPageView.php @@ -62,11 +62,9 @@ abstract class AphrontPageView extends AphrontView { $this->willRenderPage(); $title = phutil_escape_html($this->getTitle()); + $head = $this->getHead(); $body = $this->getBody(); $tail = $this->getTail(); - // NOTE: Render HEAD last so we can pick up resources required by the other - // parts. - $head = $this->getHead(); $body_classes = $this->getBodyClasses(); diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index 2ba94e5989..15d207e084 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -24,6 +24,7 @@ final class PhabricatorStandardPageView extends AphrontPageView { private $selectedTab; private $glyph; private $bodyContent; + private $menuContent; private $request; private $isAdminInterface; private $showChrome = true; @@ -168,6 +169,7 @@ final class PhabricatorStandardPageView extends AphrontPageView { 'header' => AphrontRequest::getCSRFHeaderName(), 'current' => $current_token, )); + Javelin::initBehavior('device', array('id' => 'base-page')); if ($console) { require_celerity_resource('aphront-dark-console-css'); @@ -182,6 +184,7 @@ final class PhabricatorStandardPageView extends AphrontPageView { require_celerity_resource('javelin-behavior-error-log'); } + $this->menuContent = $this->renderMainMenu(); $this->bodyContent = $this->renderChildren(); } @@ -361,7 +364,7 @@ final class PhabricatorStandardPageView extends AphrontPageView { $header_chrome = null; $footer_chrome = null; if ($this->getShowChrome()) { - $header_chrome = $this->renderMainMenu(); + $header_chrome = $this->menuContent; $footer_chrome = '
'. $foot_links. @@ -378,7 +381,6 @@ final class PhabricatorStandardPageView extends AphrontPageView { '
'; } - Javelin::initBehavior('device', array('id' => 'base-page')); $agent = idx($_SERVER, 'HTTP_USER_AGENT'); // Try to guess the device resolution based on UA strings to avoid a flash @@ -450,7 +452,7 @@ final class PhabricatorStandardPageView extends AphrontPageView { 'id' => $aphlict_container_id, 'style' => 'position: absolute; width: 0; height: 0;', ), - 'asdb'); + ''); } $response = CelerityAPI::getStaticResourceResponse();