Author Topic: After loading, page goes blank  (Read 457 times)

Offline svsanchez

  • Posts: 479
After loading, page goes blank
« on: February 22, 2019, 12:05:05 PM »
Hello!

I am experiencing a very strange problem: my page goes blank after loading, sometimes it takes 1 second and sometimes about 3 seconds to go blank. I noticed that the code that makes it go blank is an include which I use to show my main site's menu:

Code: [Select]
<?php include $_SERVER['DOCUMENT_ROOT']."/menu/sherpa/menu.html"?>
I use the exact same code in several other sections of my site without this problem.


Another strange thing is that I have to include the following code because if it is not present, the page shows an error:

Code: [Select]
<?php
// automatically include optional WB module files (frontend.css, frontend.js)
if (function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
// register_frontend_modfiles('jquery');
// register_frontend_modfiles('js');
?>

The page in question is:

http://www.deguate.com/infocentros/entretenimiento/guatemala/cine.php

What could be causing the page to go blank ?

I am having the same problem with the mobile version, but I haven't been able to determine which code makes the mobile version to go blank (the above include is NOT present on the mobile version).

Offline jacobi22

  • Posts: 5863
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: After loading, page goes blank
« Reply #1 on: February 22, 2019, 12:59:15 PM »
Problem is the horrable code inside of this target. See my screenshot....
you see the <body>-Tag in the top, followed by a table (i remove here some line, to show the problem in a small picture), after that some meta-tags and some <link> to css-files - important: after the <body>-Tag.
it is not W3C-conform, to have links to css-files behind the body-Tag and WB try to move that into the head area, but it is not only one...
if you load the page, you can see it very short, it show's the content from <body> to the first meta-tag behind the body before you get the white screen. normalize it show's here a message, max-execution-timeout or malformedContent, but maybe, display error messages are OFF
i see a Iframe in your code and (if i look to the code, maybe another Iframe in this Iframe or you have completely wrong code  with meta's inside of the <body>, but it looks for me, like a WebsiteBaker-Page in the IFrame, because, it show's the WB_URL-Block again inside of the body-Content
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline svsanchez

  • Posts: 479
Re: After loading, page goes blank
« Reply #2 on: February 24, 2019, 08:27:37 AM »
Hello Jacobi, thanks a lot for your reply, you were right about the horrible code. The include was calling the extra body and meta tags, I removed all the head section from the included file and voilà, it now works.

HOWEVER, the mobile version is still having the same problem, and this one doesn't have any included pages. I was able to determine that the codes that makes the page go blank are any link rel="stylesheet" codes, event the ones that come by default with Website Baker!

I am clueless as to why including any stylesheet code causes the page to go blank. I even tried leaving only one stylesheet code referencing a blank css file and the problem still occurs.

What could be causing this issue?

Offline jacobi22

  • Posts: 5863
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: After loading, page goes blank
« Reply #3 on: February 24, 2019, 02:01:17 PM »
did i understand correct, a page work on the desktop, but show a blank page on mobiles?

if YES, i think, it is a browser intern time out. Egde on a desktop has, for example, a timeout = one minute to start loading the page of for a stop, when its loading the content, if nothing happens in this time, you get a white screen, normalize with a message like Ups....,

in the spacial link from your post in the top, i think, it's too much work for the output filter - you can try to play with the outputfilter settings  or deactivate something in modules/outputfilter/index.php (not recommendable)

CSStoHead is here the point. this filter try to move all <link> to css-files into the <head>Area of WB

another and better solution: i see it sometime's in older modules - a link to a css-file inside of the code in view.php like this
Code: [Select]
<link rel="stylesheet" href="style.css" />or this (somewhere in a functions.php etc)
Code: [Select]
echo "<link rel=\"stylesheet\" href=\"style.css\" />";
This method comes from times when a <link> in the content from the browser has not yet been criticized in HTML and is outdated now. you do not save anything with this method, because, you need this css, to display a special design

use here the frontend.css and @import-method instead of links inside of the output code in a module like

Code: [Select]
@import url("style.css");
or add the css-definitions directly into the frondend.css-File

the logic behind... to show a special design, you need the css in every case. if your file has a size = 50kB, you load it - doesn't matter, how. (with import, with <link> or directly from frontend.css)
but with a <link>-methode inside of the <body>-code, you give the filter the job, to move it into the head area. not a big job, if you have only one, but if i look to the source from the link, it's maybe 50 or more <link> and thats needs a couple of time.

you know the structure of your project, you see, this code comes from module XY (directly or in a Iframe) - take a look into the view.php of this module(s) and the used files there like a functions.php and replace possible <link> there

P.S.: if you not use the default CSS-Definition from a module xy, you can put everything in a file called frontendUser.css (for frontend) or backendUser.css (for backend only) . these files are "private" user-files and will not be overwritten in an next possible upgrade of this module
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline svsanchez

  • Posts: 479
Re: After loading, page goes blank
« Reply #4 on: March 01, 2019, 11:30:00 PM »
Thanks a lot for your help jacobi22!

 

postern-length