Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#467: Exceptions are not shown nor logged

When an exception is thrown, only a blank page is presented.

To replicate, just throw an exception somewhere. You will be presented a blank page.

This is caused because in class.symphony.php, a check is performed which disables the error handler if the user is not logged in.

The login check (isLoggedIn()) will always return false, because of its first if statement: if (is_null(self::$_instance)) return false; because self::$_instance is not yet set this early.

There are a few options to fix this:

  1. Remove the isLoggedIn check from the symphony class.
  2. Rewrite the first check in the isLoggedIn function to also work in the early stages.

Also, I think the errorexception class should always log errors when disabled. Simply giving a blank page with nothing in the logs is NOT a good idea.

I think the if condition was added to fix #441. Perhaps the singleton/instance stuff is related to the recent forum thread Administration::instance() troubleshooting.

The isLoggedIn function is called more than one time. Depending of the context Symphony won’t work without an instance variable, so no problem to return true on that line.

@rainer: This would not be a good fix, as this would say: “If the context is not yet set, a user is logged in’. Which is definitely not the case.

In fact, I feel the problem is in the check to see if the author object is already created. That should be the fix for issue 441, and the if statement mentioned above should be removed.

Ugh, this all came about to fix the issue that verbose Exceptions (ie. Database information) were being displayed to users to who weren’t logged into Symphony. What should happen is that you create a 404 page, and if you aren’t logged in, and an exception occurs, the 404 is shown. If not, a blank page is shown.

Logged in users shouldn’t notice any difference.

@rainerborene. I’m very hesitant about just returning true if an instance doesn’t exist

I shall take a look tomorrow morning, buggered right now.

@brendo, I will send the pull requests. This shouldn’t be too hard.

Oh, and my understanding would be this: if an exception is thrown, and the user is not logged in, show a 404 page and log the error. If the user is logged in, show the error, not a blank page.

Pull request sent.

Updated is:

  1. All exceptions are now logged if they are not caught.
  2. If the user is not logged in, a 404 page is shown.
  3. If the user is logged in, the default error page is shown.

This issue is closed.

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