[SOLVED] Webpage empty

Post Reply
GrandMaster
Posts: 1
Joined: Fri Jan 10, 2020 6:02 pm

[SOLVED] Webpage empty

Post by GrandMaster » Sat Jan 11, 2020 3:31 pm

Hello, I have installed the latest version but it shows a blank page.
there is nothing I can do, so help would be appreciated.

HWU
Posts: 14
Joined: Tue Dec 26, 2017 5:46 pm

Re: webpage empty

Post by HWU » Sat Jan 11, 2020 9:06 pm

Have you considered that?
Minimum requirements to run WonderCMS
PHP version 7.2 or greater

Works fine, also with PHP 7.3!

wiz
Admin
Posts: 413
Joined: Sat Oct 30, 2010 12:23 am

Re: webpage empty

Post by wiz » Mon Jan 13, 2020 6:56 am

Hi GrandMaster, welcome to the community.

Mind sharing some of your server details?
1. Are you running Apache, NGINX or IIS?
2. Do you have any chance of enabling error logs? It currently seems you don't have them enabled, which would make debugging this easier.
3. Did you install WonderCMS through any other software or did you unzip and upload file directly to your host?

wiz
Admin
Posts: 413
Joined: Sat Oct 30, 2010 12:23 am

Re: webpage empty

Post by wiz » Tue Jan 14, 2020 8:12 pm

I absolutely agree with HWU on this one, it's best to verify first and also while seeking support -> following the rules: viewtopic.php?f=45&t=1267 which makes it easier to debug what's missing.

bmherard
Posts: 3
Joined: Thu Jan 16, 2020 8:57 pm

Re: webpage empty

Post by bmherard » Tue Jan 21, 2020 5:08 pm

I have had the same issue and have verified that my system requirements are in place. Page is blank but here's the resulting source code as it tries to install...


<? global $Wcms ?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title><br />
<b>Notice</b>: Undefined variable: Wcms in <b>D:\xampp\htdocs\sites\wondercms\themes\default\theme.php</b> on line <b>10</b><br />
<br />
<b>Fatal error</b>: Uncaught Error: Call to a member function get() on null in D:\xampp\htdocs\sites\wondercms\themes\default\theme.php:10
Stack trace:
#0 D:\xampp\htdocs\sites\wondercms\index.php(1113): require_once()
#1 D:\xampp\htdocs\sites\wondercms\index.php(167): Wcms-&gt;loadThemeAndFunctions()
#2 D:\xampp\htdocs\sites\wondercms\index.php(16): Wcms-&gt;render()
#3 {main}
thrown in <b>D:\xampp\htdocs\sites\wondercms\themes\default\theme.php</b> on line <b>10</b><br />

bmherard
Posts: 3
Joined: Thu Jan 16, 2020 8:57 pm

Re: webpage empty

Post by bmherard » Tue Jan 21, 2020 5:29 pm

bmherard wrote:
Tue Jan 21, 2020 5:08 pm
I have had the same issue and have verified that my system requirements are in place.
I have Apache servers and have PHP 7.4. I've tried it on another Apache server with PHP 7.3.

DirkP
Posts: 2
Joined: Tue Jan 21, 2020 1:57 pm

Re: webpage empty

Post by DirkP » Wed Jan 22, 2020 1:13 pm

I have the same problem
New folder(777) and the 3.04 only

HTML

Code: Select all

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
and the log

Code: Select all

2020-01-22 13:54:30	Error	xxx	500	GET /cms/ HTTP/1.0			535 	Apache-Zugriff
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function get() on null in /var/www/vhosts/
xxx/httpdocs/cms/themes/default/theme.php:10				Apache-Fehler
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: Stack trace:				Apache-Fehler
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: #0 /var/www/vhosts/xxx/httpdocs/cms/index.php(1113): require_once()				Apache-Fehler
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: #1 /var/www/vhosts/xxx/httpdocs/cms/index.php(167): Wcms->loadThemeAndFunctions()				Apache-Fehler
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: #2 /var/www/vhosts/xxx/httpdocs/cms/index.php(16): Wcms->render()				Apache-Fehler
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: #3 {main}				Apache-Fehler
2020-01-22 13:54:30	Warning	xxx		mod_fcgid: stderr: thrown in /var/www/vhosts/xxx/httpdocs/cms/themes/default/theme.php on line 10				Apache-Fehler
2020-01-22 13:54:34	Error	xxx	500	GET /cms/ HTTP/1.0		535 	Apache-Zugriff
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function get() on null in /var/www/vhosts/xxx/httpdocs/cms/themes/default/theme.php:10				Apache-Fehler
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: Stack trace:				Apache-Fehler
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: #0 /var/www/vhosts/xxx/httpdocs/cms/index.php(1113): require_once()				Apache-Fehler
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: #1 /var/www/vhosts/xxx/httpdocs/cms/index.php(167): Wcms->loadThemeAndFunctions()				Apache-Fehler
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: #2 /var/www/vhosts/xxx/httpdocs/cms/index.php(16): Wcms->render()				Apache-Fehler
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: #3 {main}				Apache-Fehler
2020-01-22 13:54:34	Warning	xxx		mod_fcgid: stderr: thrown in /var/www/vhosts/xxx/httpdocs/cms/themes/default/theme.php on line 1
I've tested it with Apache and PHP 7.3 and 7.4

DirkP
Posts: 2
Joined: Tue Jan 21, 2020 1:57 pm

Re: webpage empty

Post by DirkP » Wed Jan 22, 2020 5:40 pm

I have found the problem.
Download this theme
https://github.com/StephanStanisic/_empty
Delete the default themes use this one

Now I can see a very simple site with the login. Theme download and activated and it's work. But I can not use the default themes, empty website.

It's seems a big bug in the default Theme. I have tested more themes, the other seems ok. Ok not all tested. But many

bmherard
Posts: 3
Joined: Thu Jan 16, 2020 8:57 pm

Re: webpage empty

Post by bmherard » Thu Jan 23, 2020 3:09 pm

DirkP wrote:
Wed Jan 22, 2020 5:40 pm
I have found the problem...It's seems a big bug in the default Theme.
Thanks for finding a solution. Works like a charm now.

wiz
Admin
Posts: 413
Joined: Sat Oct 30, 2010 12:23 am

Re: webpage empty

Post by wiz » Thu Jan 23, 2020 6:14 pm

@DirkP, thanks for pinpointing the issue. Shoot me a message with your first/last name + website so we can add it to the https://wondercms.com/special-contributors - contributors list.

I briefly checked what's the difference between the default theme and other themes: it's using a PHP short tag `<?` instead of the full `<?php`

Your servers seems to have the short tag disabled (and are usually enabled by default: https://stackoverflow.com/questions/218 ... short-tags)

I've pushed the fix for the default theme. Please login to your website and click "Check for updates" in the Settings panel, and an update for the default theme will be shown.

It make take a while for GitHub to clear the cached version file (if they haven't yet).

Post Reply