RedirectTo not working as expected in comet-actors due to S.contextPath being empty when it shouldn't

53 views
Skip to first unread message

Andreas Joseph Krogh

unread,
Jan 23, 2014, 4:11:51 PM1/23/14
to liftweb
@fmpwizard;
Have you gotten any time to look at this issue?
https://github.com/lift/framework/issues/1495 (S.contextPath empty in comet-actors)
 
This totally breaks using RedirectTo (and other stuff) in comet-actors, and which is why capturing the context-path in Boot in a custom global-var doesn't cut it.
 
Do we still beleive that making Req Empty in comet-actors would be best (I think so)?
 
Thanks.
 
--
Andreas Joseph Krogh <and...@officenet.no>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc

Diego Medina

unread,
Jan 23, 2014, 8:17:10 PM1/23/14
to Lift
I haven't had the time, so if you or any other committer wants to take it, go for it. I still think that making Req Empty is the way to go


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am

Andreas Joseph Krogh

unread,
Jan 24, 2014, 3:23:49 AM1/24/14
to lif...@googlegroups.com
På fredag 24. januar 2014 kl. 02:17:10, skrev Diego Medina <di...@fmpwizard.com>:
I haven't had the time, so if you or any other committer wants to take it, go for it. I still think that making Req Empty is the way to go
 
I'll see if I get time this weekend.

Channing Walton

unread,
Feb 17, 2015, 1:00:34 PM2/17/15
to lif...@googlegroups.com
Hi, I am guessing this isn't fixed yet as we've just run into it.

Our scenario is a comet actor serving an ajax button that results in a redirect. But JsCmds.RedirectTo uses S.redirectTo so it ignores the context path.

Channing

Diego Medina

unread,
Feb 17, 2015, 1:22:37 PM2/17/15
to Lift
it's fixed in 3.0-M2 are you on 2.x?

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andreas Joseph Krogh

unread,
Feb 17, 2015, 1:35:34 PM2/17/15
to lif...@googlegroups.com
På tirsdag 17. februar 2015 kl. 19:00:34, skrev Channing Walton <channin...@mac.com>:
Hi, I am guessing this isn't fixed yet as we've just run into it.
 
Our scenario is a comet actor serving an ajax button that results in a redirect. But JsCmds.RedirectTo uses S.redirectTo so it ignores the context path.
 
Yea, it's a pain in < 3.0. I have a patched copy which incorporates the fix in 3.0 for 2.6.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
 

Channing Walton

unread,
Feb 17, 2015, 1:43:44 PM2/17/15
to lif...@googlegroups.com
Yes, 2.6

I haven't had a chance to investigate upgrading to 3 yet.

Diego Medina

unread,
Feb 17, 2015, 1:46:27 PM2/17/15
to Lift
ok, in that I think the simplest way would be to manually add the context path to those calls, and add a note that when/if you upgrade to 3.0, you need to remove that workaround.

Andreas Joseph Krogh

unread,
Feb 17, 2015, 1:48:35 PM2/17/15
to lif...@googlegroups.com
På tirsdag 17. februar 2015 kl. 19:46:22, skrev Diego Medina <di...@fmpwizard.com>:
ok, in that I think the simplest way would be to manually add the context path to those calls, and add a note that when/if you upgrade to 3.0, you need to remove that workaround.
 
I think it's actually easier to backport Diego's PR to 2.6, then you don't have to do anything when you upgrade to 3.0:-)

Channing Walton

unread,
Feb 17, 2015, 1:57:39 PM2/17/15
to lif...@googlegroups.com


On Tuesday, 17 February 2015 18:48:35 UTC, andreak wrote:
På tirsdag 17. februar 2015 kl. 19:46:22, skrev Diego Medina <di...@fmpwizard.com>:
ok, in that I think the simplest way would be to manually add the context path to those calls, and add a note that when/if you upgrade to 3.0, you need to remove that workaround.
 
I think it's actually easier to backport Diego's PR to 2.6, then you don't have to do anything when you upgrade to 3.0:-)


That would be ideal of course :)

My current fix in some library code we have which may be called within comet or not, involves comparing S.contextPath and S.session.contextPath, if they are different then Lift is about to get it wrong so I prepend the session contextPath otherwise leave it.

Antonio Salazar Cardozo

unread,
Feb 18, 2015, 1:18:39 PM2/18/15
to lif...@googlegroups.com
We'd have to spin up another 2.x release cycle. I'm not necessarily opposed, but I also don't
want to spend any of my time on it, so if some committers are willing to volunteer and step up
to deal with backporting and such, it seems like a perfectly good idea! There are definitely two
or three fixes in master that would be nice on 2.x.
Thanks,
Antonio

Diego Medina

unread,
Feb 18, 2015, 1:43:21 PM2/18/15
to Lift
if we have 3 or more fixes to backport, I could spin a 2.7 build with them

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andreas Joseph Krogh

unread,
Feb 18, 2015, 4:53:09 PM2/18/15
to lif...@googlegroups.com
På onsdag 18. februar 2015 kl. 19:18:39, skrev Antonio Salazar Cardozo <savedf...@gmail.com>:
We'd have to spin up another 2.x release cycle. I'm not necessarily opposed, but I also don't
want to spend any of my time on it, so if some committers are willing to volunteer and step up
to deal with backporting and such, it seems like a perfectly good idea! There are definitely two
or three fixes in master that would be nice on 2.x.
Thanks,
Antonio
 
I think we already discussed this and (AFAIR) came to the conclusion that since it's a breaking change we didn't want it in 2.x. Although I'm not really sure who actually relies on the 2.x behaviour.

Channing Walton

unread,
Feb 18, 2015, 4:57:12 PM2/18/15
to lif...@googlegroups.com
I would of course appreciate a 2.x version but this is probably quite easy for us to workaround, and we’ll move to 3 as soon as its released.

 

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/2cPmhI7fvRw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
signature.asc

Antonio Salazar Cardozo

unread,
Feb 19, 2015, 9:57:48 AM2/19/15
to lif...@googlegroups.com
On Wednesday, February 18, 2015 at 4:53:09 PM UTC-5, andreak wrote:
I think we already discussed this and (AFAIR) came to the conclusion that since it's a breaking change we didn't want it in 2.x. Although I'm not really sure who actually relies on the 2.x behaviour.

Ah yes, this is a fair point… I hadn't been thinking about that hehe.
Thanks,
Antonio
Reply all
Reply to author
Forward
0 new messages