NetTalk Central

Author Topic: ValidateUpdate/All are no longer called  (Read 6259 times)

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
ValidateUpdate/All are no longer called
« on: January 31, 2011, 02:02:29 AM »
Hi,

I have a logout form in place for quite a long time. Now all of a sudden this does not work any more. When tracking down the cause, I found out that the embeds ValidateUpdate and ValidateAll on this form are not called.
This form is used to 'logout' the user with the following code in the ValidateUpdate embed (like example 3).

    p_web.SetSessionLoggedIn(0)
    p_web.DeleteSession()
    db.DebugOut('p_web.GetSessionLoggedIn()=' &p_web.GetSessionLoggedIn(),'frmLogout')

The debug is placed to see if this embed is called.

But it doesn't. Also when deleting this form and recreate it again doesn't help.
What am I doing wrong of overseeing here?

Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #1 on: February 01, 2011, 03:08:10 AM »
Example 3 has a Logout Form which does I think as you're describing.
When I added a p_web._trace statement in there I see it in Debugview.
So I'm guessing the problem might be in your code, or you need to post an example.

cheers
Bruce

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: ValidateUpdate/All are no longer called
« Reply #2 on: February 01, 2011, 03:44:00 AM »
Just added this debugout:
Just before 'case p_stage' I entered: db.debugout('p_stage=' & p_stage,'frmLogout')

Resulting in this debug output:

[1084] `JeGer2 - frmLogout - p_stage=0
[1084] `JeGer2 - frmLogout - p_stage=16384

No stage is called for updating the form...
Greetz,
Sjoerd

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #3 on: February 01, 2011, 05:55:13 AM »
can you duplicate the effect in example 3?

bergsj

  • Jr. Member
  • **
  • Posts: 81
    • MSN Messenger - swjvandenberg@hotmail.com
    • View Profile
    • Email
Re: ValidateUpdate/All are no longer called
« Reply #4 on: February 03, 2011, 05:01:03 AM »
No that's the pain. I can't. I only goes wrong I my current app.
Greetz,
Sjoerd

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #5 on: April 07, 2014, 01:38:27 PM »
After more than two years I have same problem as Sjoerd.

My LoginForm does not validate. Simply never reach ValidateUpdate code. I tried to play with debugger but only difference between LoginForm in other application and this loginform is that problematic form never receive value Net:ChangeRecord + NET:WEB:StageValidate.
Why is that it is far to complicated to investigate.

As Sjoerd said, no luck with recreating new one.

Best regards,

Djole

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #6 on: April 07, 2014, 07:18:27 PM »
Here are DebugView logs for both applications. It is clear that first application missing last six calls to LoginForm

1   0.000000   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[16384  net:web:Init] Event=
2   0.000203   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm END p_stage=16384  net:web:Init Event=
3   0.001593   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[0  net:web:Generate] Event=
4   0.001817   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[16384  net:web:Init] Event=
5   0.001949   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm END p_stage=16384  net:web:Init Event=
6   0.008307   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm END p_stage=0  net:web:Generate Event=
7   4.145606   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[65536  net:web:Div] Event=accepted
8   4.145996   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm : CallDiv : PageName = loginform_Loc:Login_value event=accepted
9   4.147694   3760   B2BUni.exe   [st] [netTalk][thread=3] LoginForm END p_stage=65536  net:web:Div Event=accepted

1   0.000000   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[16384  net:web:Init] Event=
2   0.000119   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=16384  net:web:Init Event=
3   0.010310   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[0  net:web:Generate] Event=
4   0.010482   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[16384  net:web:Init] Event=
5   0.010641   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=16384  net:web:Init Event=
6   0.015732   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=0  net:web:Generate Event=
7   7.210181   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[65536  net:web:Div] Event=accepted
8   7.210238   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm : CallDiv : PageName = loginform_Loc:Login_value event=accepted
9   7.210623   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=65536  net:web:Div Event=accepted
10   11.322012   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[10240  net:web:StageVALIDATE net:web:SetPics] Event=
11   11.322104   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=10240  net:web:StageVALIDATE net:web:SetPics Event=
12   11.322394   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[2050  net:web:StageVALIDATE net:web:Change] Event=
13   11.334043   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=2050  net:web:StageVALIDATE net:web:Change Event=
14   11.334139   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm START p_stage=[4098  net:web:StagePOST net:web:Change] Event=
15   11.334375   4988   aTAX.exe   [st] [netTalk][thread=3] LoginForm END p_stage=4098  net:web:StagePOST net:web:Change Event=

Best regards,

Djole

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #7 on: April 07, 2014, 10:34:30 PM »
Delete Session could be bad option.

 >:(

best regards,

Djole

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #8 on: April 08, 2014, 06:20:58 AM »
you are doing a Logout in the procedure, and on the WebServer, Security tab you have set it to "Delete Session on Logout".

That combination will not work, because your session is deleted half-way through processing the Login form. So the login form will fail.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: ValidateUpdate/All are no longer called
« Reply #9 on: April 08, 2014, 09:16:23 AM »
Just curious...
If I have set  "Delete Session on Logout".
What code must I use in the logout form to logout?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #10 on: April 08, 2014, 09:12:58 PM »
you can logout fine on a "logout page". What you can't do is log out on the _Login_ form. (If you are deleting the session).

Incidentally you probably should not delete the session on a logout. That is for high-security situations, and comes with some inconveniences (specifically not being able to do it inside the login form.)


cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: ValidateUpdate/All are no longer called
« Reply #11 on: April 09, 2014, 02:41:36 AM »
Then is it ok to code:

p_web.SetSessionLoggedIn(0)
p_web.DeleteSession()

In de Validate Update of a LogOUT form?

Or just coding

p_web.SetSessionLoggedIn(0)

and having set  "Delete Session on Logout". is enought?

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ValidateUpdate/All are no longer called
« Reply #12 on: April 09, 2014, 04:10:58 AM »
Then is it ok to code:

p_web.SetSessionLoggedIn(0)
p_web.DeleteSession()


Absolutly - as long as you are not in the middle of doing something which is storing things in session variables. For example you can't do the above on a form, especially a LoginForm because the form sets some variables when it opens, and needs those variables in order to work later. Deleting the session while the form is alive will by definition break the form.

If in doubt just call;

p_web.SetSessionLoggedIn(0)


You do not need to manually delete sessions - they are deleted for you when necessary.