GetSimple Support Forum

Full Version: No 404 errors on non existent urls
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Just finished a site build for a client using GetSimple - 2.01 and everything is great!

However one thing I have found is that when I visit a url that doesn't exist on the site, no error is thrown up - the screen is just blank.

Could anyone shed some light on this?

Thanks in advance.
Could you enable debug mode? The screen should never be blank unless PHP is throwing errors early on that stop everything from rendering.
Hi Zegnåt

Have enabled debug mode, and this is what I get when I type a site url that doesn't exist. (Also I'm using fancy urls)

Notice: Constant GSIMAGEWIDTH already defined in /home/coffee/public_html/gsconfig.php on line 16

Notice: Constant GSDEBUG already defined in /home/coffee/public_html/gsconfig.php on line 19

Notice: Constant GSEDITORTOOL already defined in /home/coffee/public_html/gsconfig.php on line 31

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 3: parser error : Extra content at the end of the document in /home/coffee/public_html/admin/inc/404-mailer.php on line 110

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: /channel> in /home/coffee/public_html/admin/inc/404-mailer.php on line 110

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/coffee/public_html/admin/inc/404-mailer.php on line 110

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/coffee/public_html/admin/inc/404-mailer.php:110 Stack trace: #0 /home/coffee/public_html/admin/inc/404-mailer.php(110): SimpleXMLElement->__construct('<?xml version="...') #1 /home/coffee/public_html/index.php(41): include('/home/coffee/pu...') #2 {main} thrown in /home/coffee/public_html/admin/inc/404-mailer.php on line 110
anyone?
Can you post the contents of "data/other/logs/404monitoring.log.xml"?

Something in that file is causing the page to die before completion.
Hi dig412

The problem was a broken closing </channel> tag at the bottom of the xml.

I've fixed this and all is working well.

Thanks for the tip and pointing me in the right direction Smile

Thanks again!
Hi,

Had exactly the same as purtle: just blank screen on 4O4!

In debug mode:

Code:
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : Extra content at the end of the document in /home/dareis/domains/dare-is.nl/public_html/admin/inc/404-mailer.php on line 110
Warning: SimpleXMLElement::__construct(): Browser> in /home/dareis/domains/dare-is.nl/public_html/admin/inc/404-mailer.php on line 110
Warning: SimpleXMLElement::__construct(): ^ in /home/dareis/domains/dare-is.nl/public_html/admin/inc/404-mailer.php on line 110
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/dareis/domains/dare-is.nl/public_html/admin/inc/404-mailer.php:110
Stack trace: #0 /home/dareis/domains/dare-is.nl/public_html/admin/inc/404-mailer.php(110): SimpleXMLElement->__construct('

After reading purtle last comments my first thought was a broken/corrupted xml file. The error in '404-mailer.php' (see above) was about creating a new entry in the 4O4 logging file "data/other/logs/404monitoring.log.xml". XML syntax in that file seems to be ok. Removed / deleted the file and 4O4 was working again Smile

So everything works! Why am I reporting this? To help others with the same problem Smile
Rene Wrote:Hi,

After reading purtle last comments my first thought was a broken/corrupted xml file. The error in '404-mailer.php' (see above) was about creating a new entry in the 4O4 logging file "data/other/logs/404monitoring.log.xml". XML syntax in that file seems to be ok. Removed / deleted the file and 4O4 was working again Smile

Hi Rene

To clarify which file did you remove/delete: 404monitoring.log.xml or 404-mailer.php?

My problem has come back so my orginal fix didn't work Wink
@purtle

Sorry, wasn't clear about that but I've removed the 404monitoring.log.xml !
This XML files is containing 4O4 log information and 404-mailer.php is making a new / clean one if this XML file doesn't exist.

Removing the 404-mailer.php (or any php file) is never a good idea.

Let me know if your problem stays
@Rene

Cool I've deleted 404monitoring.log.xml and the problem seems to be fixed!

Thanks for providing this help Smile
Hi all,

Had it again - a blank screen on 4O4! I've checked 404monitoring.log.xml and there was an error on last line ???
Code:
<?xml version="1.0"?>
<channel>
.... (lines)
</channel>
Browser></entry></channel>
There is no need for last line, it's repeated??