Search

Hi guys,

Just thinking about ways of handling nicely xslt errors and even mysql errors i.e. direct them to a 500 page and sending an email alert that a page is broken. Even sending email alerts if the whole site is down and just displaying a 500 error link text.

Whats the best way to go about this?

Thanks as always

You can manipulate the files in symphony/template/ to display errors the way you want or do stuff if they occur.

Sending mails if the site goes down would be a bit more difficult I guess (you'd need a second server that checks if the site is dead). I know Nagios does a good job of monitoring server statuses but I have never used it myself.

I really think it is a shame it's not possible to create those pages using standard symphony pages. Ofcourse, if something is wrong with your database, it won't be able to load the information it needs to render the correct page, but still.

It would be really great if it was possible to attach events to the error pages, for example for emailing the admin that something has gone wrong. (I am already doing this for 404 error, which is really, really helpful).

What about creating a new 500 page type so that, if a page with that type exists, it will be displayed instead of showing the standard Symphony XSLT error page? You could have all the details about the error in a DS and then use events to send them to the site owner/server administrator/whoever you want. This is already happening with 404 pages, so it feels natural to me.

Makes sense to have something like this the only problem with using datasource on a 500. Say if there is a server error - ie connecting then the page would fail in displaying the error page again. So I would not attach any DS to the 500page - just logs as it currently does is enough no need to clog db further.

Obviously an email would be great to have - more of a notification rather then a how to fix it. This would enable us to work without having to check the website(s) for downtime every other minute.

PS. it would be cool to have the normal dump sent via email instead of shown to screen would avoid creating new templates for emailing the admin that an error occurred.

So I would not attach any DS to the 500page - just logs as it currently does is enough no need to clog db further.

Yep, I was thinking of XSLT errors anyway... That would be fun to see what happens if there's a runtime XSLT error in the 500 page itself. Kaboom! ;-)

probably another fall-back to the current error page I presume or a complete blank? I would go for plain old html no xsl tags so it wouldn't have any reason to break.

Customizing the output for xslt errors would also allow for a friendlier way to use xsl:message , which throws a warning-level error in php.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details