-
Notifications
You must be signed in to change notification settings - Fork 70
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
Post shows edit button but trying to save the message gives "post is too old" error #315
Comments
The relevant code is here: https://github.com/nim-lang/nimforum/blame/master/src/forum.nim#L516. Reading it I don't see what the cause of this could be. @narimiran any ideas? |
Thanks for the quick reply! :-) I don't know if it's relevant for reproducing the bug, but before the mentioned two posts I hadn't posted any message for over a year. Maybe there's a threshold of some kind that's not processed correctly. |
I've taken a quick look. I think this code here should be changed to account for the elapsed time since posting and then don't show |
Thanks for the fix! I still wonder why I couldn't edit the post anymore even after a few minutes. As far as I understand the code, the threshold is supposed to be two hours, isn't it? |
This is something I didn't experience in my using of the forum, i.e. I regularly edit my posts after I submit them. |
I believe you, but I experienced it nonetheless. :-) It seems there are additional conditions for this bug. If you don't want to invest more time in debugging this problem, I understand that, too. Do you have any plans when to deploy the fix on https://forum.nim-lang.org ? If the new version is there, I'd tell you in case I run again into the "can't edit shortly after posting" issue. |
I wrote two posts in the thread https://forum.nim-lang.org/t/8927 and want to edit the second post, https://forum.nim-lang.org/t/8927#58310 . When I edit the post and try to save it I get the error message "This post is too old and can no longer be edited".
I got this message already after a few minutes after posting, and I get it now. But even if the post was too old it wouldn't make sense to show the Edit icon below the post (even when I reload the thread page now). Since posts used to be editable rather for days, I guess the ability to edit is the actually wanted behavior, but it's prevented by the error message instead of a successful submission of the edited post.
My web browser is Firefox 97.0 on Linux.
The text was updated successfully, but these errors were encountered: