Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

[bz5707658] ac.http.redirect does not work from a child mojit #293

Closed
rwaldura opened this issue Jul 20, 2012 · 8 comments
Closed

[bz5707658] ac.http.redirect does not work from a child mojit #293

rwaldura opened this issue Jul 20, 2012 · 8 comments
Assignees
Labels

Comments

@rwaldura
Copy link
Contributor

ac.http.redirect is not working because i'm using it in the child mojit.
The parent calls ac.composite.done to collect the children views and stop the execution.
But here, ac.http.redirect stops the child mojit's execution & the parent still keeps on running.

mojito/app/addons/ac/http.server.js - the "redirect" method calls ac.done inside, which will not work in parent-chilren mojit scenario.

@caridy
Copy link
Contributor

caridy commented Jan 29, 2013

@rwaldura this is still an issue, feel free to create a card in trello for prioritization.

@rwaldura
Copy link
Contributor Author

Workaround is to pass the parent's action context to the child mojit.

@caridy caridy reopened this Feb 21, 2013
@ghost ghost assigned caridy Feb 21, 2013
@caridy
Copy link
Contributor

caridy commented Feb 21, 2013

Mixing "ac" from parent to child chould be problematic. I think the solution for this is also related to the work I have done on error propagation from child to parents, etc. I will think more about this.

@sqawasmi
Copy link

seems this related to an issue i have, ac.http.redirect is not working in HTMLFrameMojit child, this was working fine in 0.5.2 but got broken by 0.5.3

@caridy
Copy link
Contributor

caridy commented Feb 22, 2013

@sqawasmi can you provide an repro case?

@sqawasmi
Copy link

the following is a sample repo:
https://github.com/sqawasmi/htmlframe_mojit_mojito_issue_293.git

in mojito 0.5.2, requesting the following link:
http://127.0.0.1:8666/
will redirect you to http://127.0.0.1:8666/index

however, running the same application using mojito 0.5.3 will give HTTP/1.1 200 OK with "null" in the body.

@caridy
Copy link
Contributor

caridy commented Feb 23, 2013

That's all I need, thanks @sqawasmi. I will try to get this fix for 0.5.5 on monday.

caridy added a commit that referenced this issue Feb 25, 2013
Fixed issue #293. HTMLFrameMojit should honor child metas, including ac.http.redirect() related metas.
@caridy
Copy link
Contributor

caridy commented Feb 25, 2013

This fix will be included in tomorrow's release!

@caridy caridy closed this as completed Feb 25, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants