View Issue Details

IDProjectCategoryView StatusLast Update
0002482OXID eShop (all versions)4.08. Cachepublic2012-12-10 13:39
Reportergpayer Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.4.6 revision 32697 
Fixed in Version4.5.2 revision 38481 
Summary0002482: Login errors not shown on cached views
DescriptionIf 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
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

birute_meilutyte

2011-05-16 15:47

reporter   ~0004590

@developers: can't reproduce on 4.5.0 version. check from source code side if such issue still exist and if offered solution is correct

Linas Kukulskis

2011-08-10 15:04

reporter   ~0004977

is already fixed in lates versions