session ID magic within included files?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

session ID magic within included files?

Steve Upton

Lasso 9.2

I don't recall name of the magic that Lasso performs on URL's within anchor tags to add the session ID to the URL but…

It doesn't appear to work within "include" 'ed files… true? on purpose?

Regards,

Steve


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

stevepiercy
My guess is you are declaring a local and trying to pass that
into your include file.  That no workie in 9.

Please paste relevant code sample.

--steve


On 6/5/12 at 4:15 PM, [hidden email] (Steve Upton) pronounced:

>Lasso 9.2
>
>I don't recall name of the magic that Lasso performs on URL's
>within anchor tags to add the session ID to the URL but…
>
>It doesn't appear to work within "include" 'ed files… true? on purpose?
>
>Regards,
>
>Steve
>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

Steve Upton

On Jun 5, 2012, at 4:21 PM, Steve Piercy - Web Site Builder wrote:

> My guess is you are declaring a local and trying to pass that into your include file.  That no workie in 9.
>

I did discover that one but there's not sign of that problem.

basically I have a number of "wrapper" files and they all "include:" a file that contains the [records] tags and all the iterative stuff for a (flexible) list.

The wrapper files contain the inlines and do the searching, etc. It all seems to work OK in L9 but any anchor tags don't get "uselink"-ed to have the session ID in them. So something like:

<a href="orderDetail.lasso?orderid=[field('order_id')]">
        [field: 'order_id']
</a>

It's older code and style that could be a lot better but I'd rather not rewrite it all right now :-)

Regards,

Steve



#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

stevepiercy
Try a sanity check.

Does it work in 8 as is?

What if you pull the code from the include and paste it into the
calling file, replacing include: with that code?  Does it work
as expected in that case?

--steve


On 6/5/12 at 4:31 PM, [hidden email] (Steve Upton) pronounced:

>On Jun 5, 2012, at 4:21 PM, Steve Piercy - Web Site Builder wrote:
>
>>My guess is you are declaring a local and trying to pass that into your
>include file.  That no workie in 9.
>>
>
>I did discover that one but there's not sign of that problem.
>
>basically I have a number of "wrapper" files and they all
>"include:" a file that contains the [records] tags and all the
>iterative stuff for a (flexible) list.
>
>The wrapper files contain the inlines and do the searching,
>etc. It all seems to work OK in L9 but any anchor tags don't
>get "uselink"-ed to have the session ID in them. So something like:
>
><a href="orderDetail.lasso?orderid=[field('order_id')]">
>[field: 'order_id']
></a>
>It's older code and style that could be a lot better but I'd
>rather not rewrite it all right now :-)
>
>Regards,
>
>Steve
>
>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

Steve Upton

On Jun 5, 2012, at 4:49 PM, Steve Piercy - Web Site Builder wrote:

> Try a sanity check.
>
> Does it work in 8 as is?

Yep, 8.5

>
> What if you pull the code from the include and paste it into the calling file, replacing include: with that code?  Does it work as expected in that case?
>

I can do one better, I've just found that one of the "wrapper" files works, and another doesn't. (included list file the same in both cases)

So L9 does do it on included files and something in one of the fairly skeletal wrappers is causing the problem.

The problem file has a few IF/ELSE statements and also uses SQL in the inline (the other doesn't). Other than that there's no difference that I can see between them.

very odd

A point worth mentioning. The other day I had the same problem with some other files. I found that I was explicitly adding the session ID to some forms via a hidden field. L9 seemed to be properly adding the session info to the form's URL so I removed the hidden sess field.  ALL links following that field suddenly started working. It was as if simply accessing the session ID caused all subsequent link dressing to stop.

Unfortunately in this case there are no sess tags in the problem wrapper file… but I suspect some other silliness.

Regards,

Steve

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

Steve Upton

OK, solution found.

And it's weird.

I had some commented-out HTML code at the bottom of the page so the page ended with "-->" with NO trailing return.

THAT was the problem. If I pulled out the commented code OR simply append a return to the bottom of the file Lasso dressed all URLs.

smell like a bug or was I really doing something wrong?

Regards,

Steve


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

stevepiercy
Interesting.  Suggest sending a reproducible test case and
supporting files to [hidden email].  It may be that the lack
of an EOF or EOL caused the session decorator to expect more code.

--steve


On 6/5/12 at 5:20 PM, [hidden email] (Steve Upton) pronounced:

>OK, solution found.
>
>And it's weird.
>
>I had some commented-out HTML code at the bottom of the page so
>the page ended with "-->" with NO trailing return.
>
>THAT was the problem. If I pulled out the commented code OR
>simply append a return to the bottom of the file Lasso dressed
>all URLs.
>
>smell like a bug or was I really doing something wrong?
>
>Regards,
>
>Steve
>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

Steve Upton

The fun continues.

Consider the following code:

<a href="testlink.lasso">testlink</a>
          <a href="mailto:[field('billemail')]">e</a>
<a href="testlink.lasso">testlink</a>

The first test link is dressed, the second is not.

It seems like Lasso 9 doesn't like me setting a mailto: tag

Regards,

Steve


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

stevepiercy
There are 3 links.  Why would the second, a mailto:, get a session decorator?

From the Language Guide:

    Links are only modified if they reference a file on the same machine as
    the current Web site. Any links which start with any of the following
    strings are not modified.

        file://     ftp://  http://  https://
        javascript:  mailto:  telnet://  #

--steve


On 6/5/12 at 6:00 PM, [hidden email] (Steve Upton) pronounced:

> The fun continues.
>
> Consider the following code:
>
> <a href="testlink.lasso">testlink</a>
>     <a href="mailto:[field('billemail')]">e</a>
> <a href="testlink.lasso">testlink</a>
>
> The first test link is dressed, the second is not.
>
> It seems like Lasso 9 doesn't like me setting a mailto: tag
>
> Regards,
>
> Steve
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

Steve Upton

i must not have been clear

I don't want the mailto to get decorated. The mere presence of it causes decoration to stop for the rest of the page.

Regards,

Steve


On Jun 5, 2012, at 6:19 PM, Steve Piercy - Web Site Builder wrote:

> There are 3 links.  Why would the second, a mailto:, get a session decorator?
>
> From the Language Guide:
>
>    Links are only modified if they reference a file on the same machine as
>    the current Web site. Any links which start with any of the following
>    strings are not modified.
>
>        file://     ftp://  http://  https://
>        javascript:  mailto:  telnet://  #
>
> --steve
>
>
> On 6/5/12 at 6:00 PM, [hidden email] (Steve Upton) pronounced:
>
>> The fun continues.
>>
>> Consider the following code:
>>
>> <a href="testlink.lasso">testlink</a>
>>    <a href="mailto:[field('billemail')]">e</a>
>> <a href="testlink.lasso">testlink</a>
>>
>> The first test link is dressed, the second is not.
>>
>> It seems like Lasso 9 doesn't like me setting a mailto: tag
>>
>> Regards,
>>
>> Steve
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

Steve Upton
In reply to this post by stevepiercy

i must not have been clear

I don't want the mailto to get decorated. The mere presence of it causes decoration to stop for the rest of the page.

Regards,

Steve


On Jun 5, 2012, at 6:19 PM, Steve Piercy - Web Site Builder wrote:

> There are 3 links.  Why would the second, a mailto:, get a session decorator?
>
> From the Language Guide:
>
>    Links are only modified if they reference a file on the same machine as
>    the current Web site. Any links which start with any of the following
>    strings are not modified.
>
>        file://     ftp://  http://  https://
>        javascript:  mailto:  telnet://  #
>
> --steve
>
>
> On 6/5/12 at 6:00 PM, [hidden email] (Steve Upton) pronounced:
>
>> The fun continues.
>>
>> Consider the following code:
>>
>> <a href="testlink.lasso">testlink</a>
>>    <a href="mailto:[field('billemail')]">e</a>
>> <a href="testlink.lasso">testlink</a>
>>
>> The first test link is dressed, the second is not.
>>
>> It seems like Lasso 9 doesn't like me setting a mailto: tag
>>
>> Regards,
>>
>> Steve
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: session ID magic within included files?

stevepiercy
In reply to this post by Steve Upton
OK, I can sort of confirm that.

Here's a code sample that illustrates the issue.

---------------------------
session_uselink.lasso
---------------------------
<html>
<head>
     <title>Lasso Session -uselink Failure Test Case</title>
</head>
<body>
[
// start the session
session_start('mysession', -expires=15, -uselink);
]
session_id = [session_id('mysession')]
<br>session_result = [session_result('mysession')]
<hr>
[
if(session_result('mysession') == 'end');
     session_removevar('mysession', 'mysessionvar');
     session_end('mysession');
else;
     session_addvar('mysession', 'mysessionvar');
     var('mysessionvar' = 'somevalue');
/if;
]
<a href="?action=1">Page by action_param</a><br>
<a href="[web_request->requesturi]">Page by webrequest->requesturi</a><br>
<a href="[response_filepath]">Page by response_filepath</a><br>
<a href="session_uselink.lasso">Page by hard-coding file name</a><br>

<hr>
<a href="mailto:[hidden email]">This is an email link.  
This link and all the rest will not get decorated with a session ID.</a><br>
<hr>

<a href="?action=1">Page by action_param</a><br>
<a href="[web_request->requesturi]">Page by webrequest->requesturi</a><br>
<a href="[response_filepath]">Page by response_filepath</a><br>
<a href="session_uselink.lasso">Page by hard-coding file name</a><br>
<br>
<a href="?action=end">End Session</a>
</body>
</html>

--steve




On 6/5/12 at 8:30 PM, [hidden email] (Steve Upton) pronounced:

>i must not have been clear
>
>I don't want the mailto to get decorated. The mere presence of
>it causes decoration to stop for the rest of the page.
>
>Regards,
>
>Steve
>
>
>On Jun 5, 2012, at 6:19 PM, Steve Piercy - Web Site Builder wrote:
>
>>There are 3 links.  Why would the second, a mailto:, get a session decorator?
>>
>>From the Language Guide:
>>
>>Links are only modified if they reference a file on the same machine as
>>the current Web site. Any links which start with any of the following
>>strings are not modified.
>>
>>file://     ftp://  http://  https:// javascript:  mailto:  
>>telnet://  #
>>
>>--steve
>>
>>
>>On 6/5/12 at 6:00 PM, [hidden email] (Steve Upton) pronounced:
>>
>>> The fun continues.
>>>   Consider the following code:
>>>   <a href="testlink.lasso">testlink</a>
>>>     <a href="mailto:[field('billemail')]">e</a>  <a href="testlink.lasso">testlink</a>
>>>   The first test link is dressed, the second is not.
>>>   It seems like Lasso 9 doesn't like me setting a mailto: tag
>>>   Regards,
>>>   Steve
>>>    #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>