NetTalk Central

Author Topic: NT 8.19 - Issues with _chain_  (Read 2620 times)

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
NT 8.19 - Issues with _chain_
« on: July 18, 2014, 07:16:07 PM »
Hey Bruce/Folks,

Just upgraded to 8.19 because it gives us back our loading gifs! Huzzah.

But.

Now, after I log in and log out and then try to log back in again .. BOOM.

The url of the previous page gets a _chain_=1 added to it, and the login page is loaded again, clear of values.

** The thing that's different about this login page is that it doesn't do any logging in. Once the username + password are entered, it moves to a Terms and Agreement page (where the actual logging in code is).

Picture attached of the source code. I change the loc:formaction field to be the Terms and Agreement url.

This was working fine in 8.18. Is no longer working in 8.19 [EDIT .. Now am not 100% on this, pretty sure I was logging in multiple times, but it might have been in different browsers, so this could have been something in nt8, 8.18 being my first version from nt7).

[attachment deleted by admin]
« Last Edit: July 18, 2014, 07:54:48 PM by Stu »
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NT 8.19 - Issues with _chain_
« Reply #1 on: July 18, 2014, 07:20:06 PM »
Forgot to add. The URL on Save is also the Terms and Agreement page.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NT 8.19 - Issues with _chain_
« Reply #2 on: July 20, 2014, 05:27:40 PM »
Can confirm that this issue was NOT in 8.18.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NT 8.19 - Issues with _chain_
« Reply #3 on: July 21, 2014, 12:04:03 AM »
Hey Bruce,

Wondering if this is the source of my issues - So I can temporarily solve the issue in netweb.clw to release this build tonight.

NetWeb.clw, in the .MakePage procedure, line 8221:

Code: [Select]
self.SetValue('_ChainToPage_',self.NormalizeURL(clip(self.PageName) & '&_chain_=1'))
Have also attached a screen.

Just wondering if this is the code that's causing the &_change_=1 to be appended to the url in the instance above?

And if so, can I comment it out safely (or some other portion) to solve the issue?

[attachment deleted by admin]
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NT 8.19 - Issues with _chain_
« Reply #4 on: July 21, 2014, 01:35:35 AM »
Is driving me a little crazy.

Have commented out that code, but it's doing nothing.

My login page had some custom code, assigning loc:FormAction, so I commented that out, but to no avail.

The _chain_ parameter keeps being added to my url once I've logged out and try to log back in again.

2nd: Have noticed that when I close the webserver, then start it up again (whether having compiled, or just running the exe), the _chain_ gets added straight away. So unless I clear out the url completely (because most of the time I stop the server when I'm on a page within the system), I can't log in at all.
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: NT 8.19 - Issues with _chain_
« Reply #5 on: July 21, 2014, 02:04:16 AM »
I think you have some confusion going on – not lease because chain hasn't changed over the last few builds as far as I recall.
However the Save / Cancel URL on a form was broken in 8.18 – back in 8.19 – so maybe that is interfering.

_chain_ is added when you go to a page which requires a login – it takes the user to the login page instead.
In your case I think you've "lied" to the system, and that is the root of your problem. On the web server procedure settings it asks for the login form, and you're pointing it at a Form, but you don't do the login there. That's probably a bad thing. You may have got away with this in the past, but it's still a bad thing.

What you're really suggesting is that if the user goes to a page which requires a login, then thy should actually go to LoginFrm, then Terms&C's and then to the browse. That's not gonna work - sorry.

So I think the root issue is where the Login is actually done - you may want to review that.

you could probably "kill" the chain in the LoginForm - sending the user from there to the T&C, and from there to the main index. In that way you get what you want, but the user then can't "deep link" to a page which requires a login.

Cheers
Bruce


Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NT 8.19 - Issues with _chain_
« Reply #6 on: July 21, 2014, 02:11:30 AM »
Right. Got it. My code was broken, but because 8.18 had something else broken, it got hidden.

What I'd love is for the Terms and Conditions to be a popup off the login page (so the Login page is the Login page, no lying to the code), so that when they agree, it logs them in.

Thanks Bruce.
Cheers,

Stu Andrews