Telegram_2019-10-23T15

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2019 > 10 > 23 >

Telegram_2019-10-23T15

Telegram link

 

2019-10-23T15:12:17

 

This error message is pretty clear: Your request is targeted to a session which Session ID is above (starts with F

 

cxhpy ...)

 

This session doesn't exist at all in the server. It might have existed at some stage in the past but doesn't exist anymore.

 

It is exactly the same when you have an expired session

 


 

Telegram link

 

2019-10-23T15:12:22

 

What's the doubt?

 


 

Telegram link

 

2019-10-23T15:12:37

 

This does happen. It is not a bug. it is how it is supposed to work

 


 

Telegram link

 

2019-10-23T15:13:32

 

What you have to ask yourself is: Why my request is intented to a session that doesn't exist anymore?

 


 

Telegram link

 

2019-10-23T15:15:14

 

- Is your request valid?

 

- Is your session actually expired (i.e. you render a page and hours or days later you push the button and, voilá, your session actually is dead and buried)

 

- Does your request contain the actuall session ID?

 

I recommend you to uncheck the SurrogateSessionID option in your sercurity settings and see if anything changes

 


 

Telegram link

 

2019-10-23T15:19:17

 

...

 


 

Telegram link

 

2019-10-23T15:22:25

 

Set everything there to false, except ForceAjaxPost and RandomTempFileNames (for testing only, I'm not recommending to switch this definitely in production)

 


 

Telegram link

 

2019-10-23T15:22:43

 

eventually you can also set ForceAjaxPost to false and see how it goes

 


 

Telegram link

 

2019-10-23T15:40:14

 

type: mention @Alex7691 I found the problem. It is described somewhere up there in chat.

 

The error is systematic in that case, that is when you try to attach a click event (via jquery) to a IWButton and this new js event make a call to ajaxCall(...).

 


 

Telegram link

 

2019-10-23T15:40:55

 

You have to HOOk the button click to your click.

 


 

Telegram link

 

2019-10-23T15:41:46

 

Sorry José, what do you mean?

 


 

Telegram link

 

2019-10-23T15:43:17

 

Is this wrong?

 


 

Telegram link

 

2019-10-23T15:43:39

 

BtnSave is a TIWButton inside a Frame

 


 

Telegram link

 

2019-10-23T15:44:13

 

while changeOrder is a wrap around an ajaxCall

 


 

Telegram link

 

2019-10-23T15:46:26

 

You are not HOOKing the click button to your click

 


 

Telegram link

 

2019-10-23T15:46:51

 

you are intercepting the click, maybe it is the problem

 


 

Telegram link

 

2019-10-23T15:47:00

 

Yes... you are replacing the event handler with our own event handler.

 


 

Telegram link

 

2019-10-23T15:47:28

 

so, if you have your own code to handle the click, IW is out of the equation

 


 

Telegram link

 

2019-10-23T15:47:29

 

(out of contest, and a bit annoying... in the last 15.1.6 ALL the frames control have a new \_\ underscore between control name and frame name... I hate you ??)

 


 

Telegram link

 

2019-10-23T15:47:55

 

Ok, how am I supposed to do this?

 


 

Telegram link

 

2019-10-23T15:49:26

 

Yes, and it was needed to be consistent. There were 2 types of naminng convetion in IW. One with underscores and others without. With underscore is easier to read. It is virtually impossible to read code with control names which lenght is 50+ chars

 


 

Telegram link

 

2019-10-23T15:50:11

 

like

 

PARENTFRAMECHILDFRAME1CHILDFRAME2IWEDITCUSTOMERCOMMERCIALADDRESS

 


 

Telegram link

 

2019-10-23T15:50:41

 

I got to debug code like that, which is more painful than having to write PHP

 


 

Telegram link

 

2019-10-23T15:51:08

 

All right. I understant, but I had to change a lot of js with these names introducing a bit of errors.

 

So, I keep hating you ??

 


 

Telegram link

 

2019-10-23T15:51:39

 

get in the line ??

 


 

Telegram link

 

2019-10-23T15:52:45

 

(Yes you are great, ok) Sooooo... with the \hook problem\ how can I do that?

 


 

Telegram link

 

2019-10-23T15:54:41

 

what are you trying to achieve?

 


 

Telegram link

 

2019-10-23T15:57:46

 

I just need to ask for confirmation in some cases. For example with a swal().

 

But the js must be esxternal from the iw application. One day the js developer can change the swal with some other library

 


 

Telegram link

 

2019-10-23T15:58:22

 

You don't need the IWButton to do this.

 


 

Telegram link

 

2019-10-23T15:58:40

 

the easier way to decouple browser code from server code is creating wrapper functions from IW code:

 


 

Telegram link

 

2019-10-23T15:59:08

 

you declare something in your IWForm like:

 

function buttonClick(evt) {

 

CallSomeWeirdCodeInSome3rdPartyJavaScriptLibrary();

 

}

 

in your IWButton's ScriptEvents.onClick você chama sua função acima:

 

buttonClick(evt);