NetTalk Central

Author Topic: Save/Cancel buttons sometimes working, sometimes not  (Read 7402 times)

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Save/Cancel buttons sometimes working, sometimes not
« on: August 16, 2016, 09:49:38 PM »
Hi Folks,

I'm trying to track down a particularly nasty issue, that could be multiple issues, that is occurring live and as of yet I haven't been able to solve it.

Basically, it's this.

1. User is in the webserver interface, adding information via netwebforms, saving information. Some of the forms are complex, some are simple.
2. Multiple offices, in different physical locations, accessing the webserver.
3. The user will be, for example, adding/updating Person information.
4. The user will add a few Person records, and update a couple.
5. Then, for the unknown reason, the user will have a Person record open (either Insert or Change), and the Save button won't work. The Cancel button won't work.
6. After clicking on the X button and refreshing the browser, the user will try again with the same information / Person record.
7. Sometimes they will try once and it will work okay, sometimes a few times.
8. And sometimes, they let me know, and I log into the webserver and have a look.
9. On occasion I've been able to replicate the issue, once, and then try again and it does work for me. Other times it's worked for me straight away.

Thoughts:
* My initial thought was that this might have something to do with an XHTML issue, where there is some custom html somewhere on the form, causing problems. But if that's the case, then I'm not smart enough to understand why with the same entity/information, it will sometimes work and sometimes not.

Does anyone have any idea what this might be, or various troubleshooting actions I could take to try and track down what might be happening.

And Bruce, if you're here .. Be gentle. I'm still sore after the shelacking our 7s rugby team got from some mob over your way.
Cheers,

Stu Andrews

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #1 on: August 16, 2016, 10:31:18 PM »
Hi
What version of Nettalk and clarion are you using?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #2 on: August 17, 2016, 05:40:11 AM »
Stu,

do you have the vtip extension active in the app?

cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #3 on: August 17, 2016, 04:10:24 PM »
Hi Johan,

Clarion 10.0.11975 (have not upgraded the last couple of updates, heard some stuff about SQL breaking, got scared off).
Nettalk 9.12.

Hi Bruce,

No, not using vtip. I did try once to get it working, but it created lots of havoc with .. With things not working similarly to this (but in a more wide-spread manner and 100% of the time).

That's the thing, if it's something like vtip (say, I use jGrowl to popup little messages, the messages being wrapped in a p_web._jsok() ) .. If it's something like that, why wouldn't it happen 100% of the time?

And the places this is happening, there is no usage of jGrowl (which is the only custom jquery thing I can think of. No. Wait.

I do use jQuery Autocomplete, my own custom templated version of it.

But again .. If it's not happening 100% of the time for the same information (ie, the exact same record with the same html appearing), then could it still be an xhtml issue?

More questions.

Thanks Bruce.
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #4 on: August 17, 2016, 10:07:50 PM »
Hi Stu,

Is it possible to disable the other JavaScript and see if the effect is still there, or goes away?

B

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #5 on: August 18, 2016, 11:01:18 PM »
Hey Bruce,

Definitely possible to remove the jGrowl, yeah. Will do that and see.

But definitely NOT possible to remove the custom autocomplete template stuff unfortunately. It's way too prevalent across the system. Would need to really spend a lot of time on it - or if you want to upgrade the nettalk autocomplete .. eh eh? Heh heh.

So yeah, I can remove one, but not the other.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #6 on: August 21, 2016, 05:40:58 PM »
Can confirm that the issue still occurs with jGrowl removed.
Cheers,

Stu Andrews

MikeR

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #7 on: August 22, 2016, 10:27:26 AM »
This might be a bit silly, but I had similar errors when my webfolder js in production wasnt insync with the nettalk version. If you have the no java script check to yes then the red bar at the top doesnt appear to show you there is errors.


Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #8 on: August 22, 2016, 03:34:24 PM »
Thanks Mike, will check that out.

The issue isn't 100% of the time, and doesn't happen with everyone/location (ip/network). It's a frustrating one to track down. From my experience, if there's a javascript issue, then it will always trigger.

The only thing I can think of is that depending on the content on the page, some of which is custom built, it might be stuffing up for that record. But then after a few goes the save button will work, with the same record.

But yeah, I'll do a check of the javascript etc.

Stu
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #9 on: August 22, 2016, 03:47:56 PM »
Have just had an instance where it happened to me.

In firefox, with firebug going.

Popup form from browse. No errors from firebug console.

Click on Cancel button.

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<ajax-response></ajax-response>

That's the response.

But the window won't close on clicking Cancel.

I'm guessing Save won't work, but I can't click the save button, cause it's live data.

The only way out is to refresh via the address bar or click on the X in the popup window or to press ESC.

On pressing ESC, the firebug console shows the response is exactly the same as above:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<ajax-response></ajax-response>

Does this mean that the server is registering what it thinks is the close on the browse side, but the popup itself is not closing?

From memory this issue does happen with not-popup forms as well, but I guess I'm going to have to go back and check it and try and get it to break.
« Last Edit: August 22, 2016, 03:50:14 PM by Stu »
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #10 on: August 23, 2016, 03:05:20 AM »
It's really hard to debug in this sort of abstract way Stu.
Clicking on Cancel will typically go back to the form, and the form will generate a small bit of Javascript to close the form. From the response it's not clear why the cancel fails.

But perhaps inspect the stage on the form (in debugview) and see the event that comes through on a Cancel and then go from there to see why the Cancel may be suppressed.

Cheers
Bruce

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #11 on: August 23, 2016, 07:53:31 PM »
Hey Bruce, you get that I know it's hard right?

I'm not posting here for fun, or because I haven't worked on this problem for a while now.

I'm here because I'm at the end, I can't work it out, and I can't seem to work out a good way to even get started on debugging this.

That's why this post is here, to see if someone can help me.

So please - Come on. I know it's hard to debug like this.

-

I'll have a look at the stage on the form. From memory I did this, but it's foggy, so I'll give it a go, see if something falls out.
Cheers,

Stu Andrews

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Save/Cancel buttons sometimes working, sometimes not
« Reply #12 on: September 19, 2016, 07:29:04 PM »
So I've done a bit more investigation into this. The form has Send Stage To Debug ticked.

Took an example of the save button working and one not working, and compared the debugview output.

The difference, as follows, seems to be the 'stageVALIDATE' and the 'StagePost' do not get run when the save button doesn't work.

Code: [Select]
START p_stage=[2050 net:web:StageVALIDATE net:web:Change] Event=
END p_stage=2050 net:web:StageVALIDATE net:web:Change Event=
START p_stage=[4098 net:web:StagePOST net:web:Change] Event=
END p_stage=4098 net:web:StagePOST net:web:Change Event=

Bruce - Can you think of any reason why the Validate/Post stages wouldn't get run?

Could it have something to do with the form/save button info being overridden somehow, maybe by stuff in popup or child browse/form functionality?
Cheers,

Stu Andrews