Skip to content
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

Infinite Redirect for Edited Question #885

Closed
calmdev opened this issue Mar 27, 2024 · 7 comments
Closed

Infinite Redirect for Edited Question #885

calmdev opened this issue Mar 27, 2024 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@calmdev
Copy link

calmdev commented Mar 27, 2024

Describe the bug

I edited a question a few times yesterday and noticed that there is an infinite redirect on refresh.

To Reproduce

  1. Go here: https://godev.com/questions
  2. Find the post titled: How do I get started learning Go?
  3. Click it and notice question loads.
  4. Refresh the page and note an infinite redirect

Also note if you view other questions refreshing the page doesn't have the same redirect issue.

Expected behavior

Refreshing page for an edited question doesn't result in infinite redirect? I haven't had a chance to dig into it more yet. Or compare by editing other posts. Sharing here incase someone has seen it or might have an idea.

Screenshots

Screen.Recording.2024-03-27.at.2.03.08.PM.mov
Screenshot 2024-03-27 at 2 36 17 PM

Platform

  • Device: Mac Book Air, 2022
  • OS: MacOS Sonoma 14.4
  • Browser and version: Brave – Version 1.64.109 Chromium: 123.0.6312.58 (Official Build) (arm64)
  • Version: 1.20
@calmdev calmdev added the bug Something isn't working label Mar 27, 2024
@calmdev
Copy link
Author

calmdev commented Mar 27, 2024

FWIW, I just made a couple edits on this post as well and it seems fine:
https://godev.com/questions/10010000000000231/alternate-of-io-readall

Still not exactly sure what's different about the one in my video and original post.

@LinkinStars
Copy link
Member

@calmdev Thank you very much for your feedback. We have found the cause and are checking to see if there are other similar issues. Furthermore, we will fix this issue ASAP.

@LinkinStars LinkinStars self-assigned this Mar 28, 2024
@LinkinStars LinkinStars added this to the v1.3.1 milestone Mar 28, 2024
@calmdev
Copy link
Author

calmdev commented Mar 28, 2024

Awesome, I'll keep an eye out for the patch.

@zahash
Copy link
Contributor

zahash commented Apr 5, 2024

@LinkinStars

hmmm... very interesting bug. what is the issue?

@LinkinStars
Copy link
Member

LinkinStars commented Apr 6, 2024

@LinkinStars

hmmm... very interesting bug. what is the issue?

@zahash This is caused by the fact that there is a question mark(?) in the title of the question. So, I'm still testing to see if there are any other special characters that could cause this problem. 🧐

The loop is

/questions/:questionID/:questionTitle
->
/questions/:questionID/:questionTitle/:answerID(not exist)
->
/questions/:questionID/:questionTitle

Because the /questions/:questionID/:answerID is also a correct path. We need to identify if the questionTitle is a title or answerID. In this circumstances, It's a parsing error.

@calmdev
Copy link
Author

calmdev commented Apr 6, 2024

Are there specific steps or sequence of actions required to cause it?

I still haven't seen it for any other questions with (?) in the title.

In the video & screenshot what is the second id in path that is append to URL – a revision number or something?

LinkinStars added a commit that referenced this issue Apr 7, 2024
@LinkinStars
Copy link
Member

Are there specific steps or sequence of actions required to cause it?

I still haven't seen it for any other questions with (?) in the title.

58dd97a

It's probably not just the special symbols that causes this problem. My final solution was to make sure that the correct answer ID must exist.

In the video & screenshot what is the second id in path that is append to URL – a revision number or something?

This is the wrong AnswerID that lead to the infinite redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants