-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix contact insertion #3305
Fix contact insertion #3305
Conversation
On the testserver, we have multiple possible backend urls. So instead of using full urls, we can just use relative urls (For some reason called absolute urls in our codebase)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking this on so quickly!
Curious, do you think we could just adjust the full_url
definition?
I think that should also be possible. It would probably be a bit more robust, because it would make contact cards independent of base url changes |
@charludo I'm not sure if there is a way to get this to work, do you have an idea? |
Huh, I didn't even think to make the URLs relative - I think that may be a great solution though? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry, I just re-read my comment from before the holidays, and it makes no sense. I have no idea what I was thinking. Super sorry about that.
Upon reconsideration, this looks like a great solution to the problem 😄 🎉
Actually, could you implement this solution after all? 🙈 Sorry for the flip-flopping 😭 |
@david-venhoff I made the changes we talked about, would you might taking another look if this is OK like this? |
4b482f7
to
e17bb40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Lets hope that it works
e17bb40
to
901fc45
Compare
* Fix contact insertion On the testserver, we have multiple possible backend urls. So instead of using full urls, we can just use relative urls (For some reason called absolute urls in our codebase) * Just use `reverse` instead of manually coding url * Only save the absolute path --------- Co-authored-by: charludo <github@charlotteharludo.com>
Short description
On the testserver we have multiple possible backend urls, and the contacts were previously loaded using their complete server url. For example, if a user was on
https://cms-test.integreat-app.de
the contact was still loaded usinghttps://integreat-test.tuerantuer.org
. Then the login form would be returned, because the user had of course no valid session for the other url.So instead of using full urls, we can just use relative urls, like we do for all other links.
It's a bit hard to test this pr, because everything worked anyways on localhost, but I hope the explanation helps :)
I also considered adding
redirect: "error",
to the fetch call. This would at least have prevented that the full login form gets pasted. But maybe that is something we should add to all our fetch calls?Proposed changes
Side effects
Should be none
Resolved issues
Fixes: #3304
Pull Request Review Guidelines