View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002482 | OXID eShop (all versions) | 4.08. Cache | public | 2011-02-03 09:55 | 2012-12-10 13:39 |
Reporter | gpayer | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.4.6 revision 32697 | ||||
Fixed in Version | 4.5.2 revision 38481 | ||||
Summary | 0002482: Login errors not shown on cached views | ||||
Description | If caching is turned on, no login error message is shown in case of a login failure. That is because the contents of the session variable "Errors" are transfered to template variables only if the current view is not cached already. Fortunately there is a code path for cached views, so a simple copy&paste of the relevant code snippet fixes this bug: --- oxshopcontrol.php 2011-02-02 16:46:23.199637259 +0100 +++ oxshopcontrol_fixed.php 2011-02-03 09:45:23.559016634 +0100 @@ -400,6 +400,14 @@ // setting template variables $aViewData = $oViewObject->getViewData(); + + //add all exceptions to display + if ( ( $aErrors = oxSession::getVar( 'Errors' ) ) ) { + oxUtilsView::getInstance()->passAllErrorsToView( $aViewData, $aErrors ); + + // resetting errors after displaying them + oxSession::setVar( 'Errors', array() ); + } foreach ( array_keys( $aViewData ) as $sViewName ) { $oSmarty->assign_by_ref( $sViewName, $aViewData[$sViewName] ); } | ||||
Steps To Reproduce | * Turn caching on * Try to login from a cached view (e.g. start view) with wrong credentials * Repeat last step => No error message is shown | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||