Closed sdgun closed 2 years ago
It also doesn't redirect to MFE forums when click links in the email notifications
https://user-images.githubusercontent.com/4592712/145333061-2022c5f2-a42d-49db-8188-d8aa75faf52b.mp4
Challenge https://www.topcoder.com/challenges/242dfc8a-b989-4a6d-96d7-4b7d80ac5013 has been created for this ticket.This is an automated message for ghostar via Topcoder X
Challenge https://www.topcoder.com/challenges/242dfc8a-b989-4a6d-96d7-4b7d80ac5013 has been assigned to obog.This is an automated message for ghostar via Topcoder X
@atelomycterus - Can you check the redirect for the category page please? I can fix the link for the challenges.
Hmmm... Actually, looks like the challenge forum processor is using the category.url
value returned by the Vanilla API, which is pointing to vanilla.topcoder-dev
. We may have to tweak the challenge forum processor to handle this a bit more formally, so I'll just add that to the "TODO" list. As long as the redirect is working, that's enough for now.
@jmgasper The issue happens sporadically due to Topocder Auth0 iframe. So setupAuth0withRedirect.js and Vanilla embed_local.js are running. The first one uses JavaScript's window.onload and the second one jQuery's $(document).ready() method. Whether or not a redirect goes through depends on which script with the redirect is executed first. So we need to fix Vanilla entry controller + set correct {target} for Sign/SignOut Url if embedded Vanilla. Now it's is always vanilla.topcoder-dev.com. It should be platform.topcoder-dev.com if Vanilla is embedded.
Keep you updated in it.
The request initiator chain, no redirect to MFE page:
This frame is added by setupAuth0withRedirect.js and executed on JavaScript's window.onload. Return url of Auth0 is vanilla.topocder-dev.com. So user is not redirected to MFE page.
<script>function prepareFrame() {
var ifrm = document.createElement("iframe");
ifrm.setAttribute("src", "https://accounts-auth0.topcoder-dev.com/");
ifrm.style.width = "0px";
ifrm.style.height = "0px";
document.body.appendChild(ifrm);
}
window.onload = prepareFrame;</script>
Embed_local.js ( in jQuery's $(document).ready()) checks if Vanilla is embedded or not. If Vanilla is embedded then go to MFE page:
The request initiator chain:
@jmgasper Please apply PR-https://github.com/topcoder-platform/forums/pull/646. Thanks!
Use {target} for 'retUrl' in Topcoder Plugin.
if 'Garden.Embed.Allow' is true + 'Garden.Embed.RemoteUrl' is configured then the host of 'Garden.Embed.RemoteUrl' is used in {target}
Example: SignIn - https://accounts-auth0.topcoder-dev.com/?retUrl={target} SignOut - https://accounts-auth0.topcoder-dev.com/?logout=true&retUrl={target}
Looks good, thanks!
Payment task has been updated: https://www.topcoder.com/challenges/242dfc8a-b989-4a6d-96d7-4b7d80ac5013
Payments Complete
Winner: obog
Copilot: ghostar
Challenge 242dfc8a-b989-4a6d-96d7-4b7d80ac5013
has been paid and closed.This is an automated message for ghostar via Topcoder X
Steps Create a new challenge Go to challenge details page (ex- https://www.topcoder-dev.com/challenges/9fe92fbd-d495-438a-87be-25d9aa95791c) Click
It opens the page https://vanilla.topcoder-dev.com/categories/9fe92fbd-d495-438a-87be-25d9aa95791c not the MFE page
https://user-images.githubusercontent.com/4592712/145332273-772070cf-74c4-4a86-ba41-a476b3d76553.mp4