0 users online. Create an account or sign in to join them.Users
A bug in 2.2, submitted by creativedutchmen on 05 January 2011
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
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.
if (is_null(self::$_instance)) return false;
There are a few options to fix this:
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.
This should do the trick: c229059866c09f7319df6c765114e49fc5e6ebb2#diff-3
@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.
This issue is closed.
Contact the team
Symphony • Open Source XSLT CMS