Sunday, January 20, 2008

VirtueMart "Session Expired" Fix

VirtueMart is also affected by this bug. The problem is indeed a wrong order of the calls to initSessionAdmin and doGzip at the end of the file /administrator/index2.php.

103 doGzip();
105 // if task action is 'save' or 'apply' redo session check
106 if ( $task == 'save' || $task == 'apply' ) {
107 $mainframe->initSessionAdmin( $option, '' );
108 }

Change To :
102 // if task action is 'save' or 'apply' redo session check
103 if ( $task == 'save' || $task == 'apply' ) {
104 $mainframe->initSessionAdmin( $option, '' );
105 }
106 doGzip();