• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Printable error causes rollback of session update

Xon

Well-known member
#1
XenForo_FrontController::dispatch has a catch statement which checks if an exception is printable (XenForo_Exception + is printable), and then calls postDispatch with the Exception response.

However, there is no explicit code path which ensures any active transaction is rolledback before calling postDispatch.

This causes all user status updates (including user session updates) done in postDispatch to be automatically included in a transaction destined to be rolled back.

If the Exception isn't printable, it calls XenForo_Error::logException() which rolls back any transactions.
 

Xon

Well-known member
#2
This is fairly reliably causing deadlock/timeouts on Sufficient Velocity's underpowered testing site when updating Style property definitions and making some sort of error.
 

Mike

XenForo developer
Staff member
#3
Calling XenForo_Db::rollbackAll(); before the postDispatch line should be sufficient to resolve this I believe.

Thanks for you report. :)