-1

Whenever I try to load the login page <domain>/index.php?option=com_users&view=login I only see a white page. When I look at the sites source code that gets delivered, there is the CSS statement html { display:none } in the head that makes the whole page get not displayed:

<head>

    <base href="<domain>/index.php" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="generator" content="Joomla! - Open Source Content Management" />
  <title>xxxxxxxxx</title>
  <style type="text/css">
html { display:none }
  </style>
...

All other pages are shown without any problems. Above that it is related to a special template: as soon as I activate one of the standard templates the login page is working.

I could already hunt it down to the jdoc:include type="head" code part in the ìndex.php and I tried to find out where the corresponding head.php gets it from, but as I don't have any PHP experience I'm stuck here.

Has anyone some hints where to go on or (even better) an explanation or a fix for this?

I use Joomla 2.5 if this is important.

1 Answers1

2

PHP developer here. It may be due to some code in the behavior.php file under libraries\joomla\html\html.

If your login page is inside a frame, it seems to hide the page at first and then display it using it JavaScript when the browser has finished loading the page (and its assets) and also break the site out of the frame.

Do you happen to have JavaScript disabled in your browser? That might cause the problem.

/**
 * Break us out of any containing iframes
 *
 * @param   string  $location  Location to display in
 *
 * @return  void
 *
 * @since   11.1
 */
public static function noframes($location = 'top.location.href')
{
    // Only load once
    if (isset(self::$loaded[__METHOD__]))
    {
        return;
    }

    // Include MooTools framework
    self::framework();

    $js = "window.addEvent('domready', function () {if (top == self) {document.documentElement.style.display = 'block'; }" .
        " else {top.location = self.location; }});";
    $document = JFactory::getDocument();
    $document->addStyleDeclaration('html { display:none }');
    $document->addScriptDeclaration($js);

    JResponse::setHeader('X-Frames-Options', 'SAME-ORIGIN');

    self::$loaded[__METHOD__] = true;
}
brianpeiris
  • 121
  • 4
  • unfortunately not. I had already all scripts allowed on this site. To go for sure I tried it with a browser that didn't have any script blocking tools installed. – Benedikt Bauer Dec 21 '12 at 21:44
  • Are you running the site inside a frame? Perhaps the JavaScript does not work correctly. – brianpeiris Dec 21 '12 at 21:45
  • No, the site is running completely on its own, no frames. – Benedikt Bauer Dec 21 '12 at 21:47
  • Can you take a look at your "default_login.php" file under "components\com_users\views\login\tmpl\" to see if there is anything fishy in there? You might also want to try using a different template, to see if that helps. – brianpeiris Dec 21 '12 at 21:59
  • Oh, I forgot to mention that in my question. It seems to be template specific. When I take one of the standard templates, the login page is displayed as intended. – Benedikt Bauer Dec 21 '12 at 22:05
  • Is the template publicly available? I'd be guessing at the problem if I can't see the code. – brianpeiris Dec 21 '12 at 22:08
  • Not the Joomla 2.5 version. But if it helps the template for 1.5 is available for free under http://www.globbersthemes.com/index.php?option=com_docman&task=doc_download&gid=7&Itemid=57 – Benedikt Bauer Dec 21 '12 at 22:20
  • I can't find anything in the 1.5 template. I suspect the 2.5 version is *very* different code. Well, if you paid for it, I suggest you contact the template vendor for support. – brianpeiris Dec 21 '12 at 22:33