Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By nitajanorkar
#789615
Hi ..

I am using Mobile User Experience. In this,after expiring the session its showing following message -

{"error":"You have lost your session and you have to login again.","success":true,"lostSession":true}

its not redirecting to the Login Page.


It should redirect to the login page (like happening in Normal UX)

how can i do this ?
please help me on this.

thanks.
User avatar
By amosbatto
#789627
This error message is set in workflow/engine/methods/cases/proxyCasesList.php, line 4, which is used in workflow/engine/methods/cases/casesListExtJs.php and displayed to the user by workflow/engine/templates/cases/casesList.js

The problem is that casesList.js is simply displaying the JSON message, rather than redirecting with:
parent.parent.location = '../login/login'
(see line 865)
This is probably because the frame structure is different in the Mobile User Experience, so cases aren't run in frame[0].frame[0].frame[0] like on the desktop and the redirect fails. The code needs to detect the frame before redirecting to login. At least that is my best guess.

Please file a bug report about this at http://bugs.processmaker.com
It would help a lot if you can include a screen shot and exactly when the message appears (what did you click that caused it to appear.) Also include my explanation and post a link to your bug report here on the forum so I can do follow up at the next bug meeting.
By nitajanorkar
#789640
Yes i will file bug report about this....

This error is showing when user is not taking action and after 20mins session expires so if you user is taking any action(after session expired) it should redirect to Login page.

But currently its showing above error message only.for now how can i solve this please help me on this its very urgent...
User avatar
By amosbatto
#789659
Try changing the code from:
parent.parent.location = '../login/login'
To:
location = '../login/login'
Please try it and let me know if it works on the Mobile User Experience.
By cosyxu
#815678
nitajanorkar wrote: Wed Mar 08, 2017 4:18 am Hi ..

I am using Mobile User Experience. In this,after expiring the session its showing following message -

{"error":"You have lost your session and you have to login again.","success":true,"lostSession":true}

its not redirecting to the Login Page.


It should redirect to the login page (like happening in Normal UX)

how can i do this ?
please help me on this.

thanks.
Hi Amo,

I have the same error message after the session expired for web-entry form.

Can we custom this message?

Thanks,
Yuan
By cosyxu
#815711
amosbatto wrote: Wed Aug 15, 2018 1:42 am Yuan,
You can change this message by going to Admin > Languages and exporting your English PO language file. Then, edit the PO file in PoEdit to change the phrase and then reimport the PO file into ProcessMaker.
See:
https://wiki.processmaker.com/3.2/Trans ... ocessMaker
Hi Amo,

It seems I don't need to change my language file.. :?:

The issues I am facing is to change the following message:

{"error":"You have lost your session and you have to login again.","success":true,"lostSession":true}

So after the session expires, it can show the user some customer information such as :

Sorry, your session has expired, please refresh, with an image......

Thanks,
Yuan
User avatar
By amosbatto
#815733
That message is set in the PO language file, so you have to edit the PO file.

You can include HTML in the message to display an image:
Sorry, your session has expired, please refresh. <img src="http://url/to/image">

However, this message is coming from REST when the login session expires, so an Exception is thrown. This means that it can happen anywhere and your message may not be treated as HTML. You will just have to try it and see if it works.
By cosyxu
#815755
amosbatto wrote: Fri Aug 17, 2018 1:05 am That message is set in the PO language file, so you have to edit the PO file.

You can include HTML in the message to display an image:
Sorry, your session has expired, please refresh. <img src="http://url/to/image">

However, this message is coming from REST when the login session expires, so an Exception is thrown. This means that it can happen anywhere and your message may not be treated as HTML. You will just have to try it and see if it works.
Hi amo,

Thanks for the solution.

Yuan

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]