Skip to content

Commit 8d56fd5

Browse files
AnasBenjellounseboo
authored andcommitted
LUT-28956 FO session management (develop)
1 parent 79039f0 commit 8d56fd5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/java/fr/paris/lutece/plugins/forms/web/FormXPage.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,9 +894,7 @@ public synchronized XPage doSaveStep( HttpServletRequest request ) throws SiteMe
894894
// if you go to step 2, then you log in (as you didn't save any backup), the token is invalided
895895
// why are we here as we didn't try to save any backup ? So instead of throwing the error, we redirect.
896896
AppLogService.error("FormXPage l 897 : " + MESSAGE_ERROR_TOKEN );
897-
_currentStep = StepHome.findByPrimaryKey(Integer.parseInt(request.getParameter(FormsConstants.PARAMETER_ID_STEP)));
898-
List<String> errorList = new ArrayList<>( );
899-
_currentStep = FormsResponseUtils.getNextStep( _currentStep.getId( ), errorList, _formResponseManager );
897+
_currentStep = null;
900898
return getStepView( request );
901899
}
902900

@@ -1258,6 +1256,14 @@ private void initFormResponseManager( HttpServletRequest request, Form form )
12581256
if ( user != null && form.isBackupEnabled() )
12591257
{
12601258
_formResponseManager = _formService.createFormResponseManagerFromBackUp( form, user.getName( ) );
1259+
if( _formResponseManager.getCurrentStep( ) != null )
1260+
{
1261+
_currentStep = _formResponseManager.getCurrentStep( );
1262+
}
1263+
else
1264+
{
1265+
_currentStep = StepHome.getInitialStep( form.getId( ) );
1266+
}
12611267
}
12621268
else
12631269
{

0 commit comments

Comments
 (0)