umputun / remark42

comment engine
https://remark42.com
MIT License
4.77k stars 375 forks source link

cannot delete comment #1759

Closed stories-with-dice closed 2 months ago

stories-with-dice commented 3 months ago

Hello,

I have set up my comments on my blog (produced by Quartz for Obsidian). It's live and seems to work here: https://storieswithdice.com/My-House-Rules-for-Skills-in-d100-games

source code here: https://github.com/stories-with-dice/stories-with-dice.github.io

I am hosting Remark42 on a Oracle free tier server.

I can log in via Google and GH and post.

However, I get an error when trying to delete a comment:

browser console:

Failed to load resource: the server responded with a status of 400 (Bad Request)
remark.mjs:2 
 Uncaught (in promise) 
Object
code
: 
10
details
: 
"can't update comment"
error
: 
"too late to edit cf9b44e0-63ef-4295-a080-fc2a8b58449c"
[[Prototype]]
: 
Object

server log:

4|remark42 | ark42  | 2024/04/11 03:44:14.274 [INFO]  {logger/logger.go:134 logger.(*Middleware).Handler.func1.1} GET - /api/v1/comments?site=storieswithdice.com&user=google_31686197a23f273ba0b478328c421d1b768554ef&skip=0&limit=10 - remark42.storieswithdice.duckdns.org - 3790db6f8664 - 200 (1800) - 3.338661ms
4|remark42 | remark42  | 2024/04/11 03:44:17.597 [INFO]  {logger/logger.go:134 logger.(*Middleware).Handler.func1.1} GET - /api/v1/config?site=storieswithdice.com - remark42.storieswithdice.duckdns.org - 3790db6f8664 - 200 (488) - 20.28µs
4|remark42 | remark42  | 2024/04/11 03:44:17.629 [DEBUG] {api/rest_public.go:71 api.(*public).findCommentsCtrl} get comments for {SiteID:storieswithdice.com URL:https://storieswithdice.com/Blog/Sword-and-Sorcery-fiction---an-online-class}, sort -active, format tree, since 0001-01-01 00:00:00 +0000 UTC
4|remark42 | remark42  | 2024/04/11 03:44:17.629 [INFO]  {logger/logger.go:134 logger.(*Middleware).Handler.func1.1} GET - /api/v1/user?site=storieswithdice.com - remark42.storieswithdice.duckdns.org - 3790db6f8664 - 200 (234) - 25.56µs
4|remark42 | remark42  | 2024/04/11 03:44:17.630 [INFO]  {logger/logger.go:134 logger.(*Middleware).Handler.func1.1} GET - /api/v1/find?site=storieswithdice.com&url=https://storieswithdice.com/Blog/Sword-and-Sorcery-fiction---an-online-class&sort=-active&format=tree - remark42.storieswithdice.duckdns.org - 3790db6f8664 - 200 (849) - 1.124727ms
4|remark42 | remark42  | 2024/04/11 03:44:24.532 [DEBUG] {api/rest_public.go:71 api.(*public).findCommentsCtrl} get comments for {SiteID:storieswithdice.com URL:https://storieswithdice.com/Blog/Sword-and-Sorcery-fiction---an-online-class}, sort -active, format tree, since 0001-01-01 00:00:00 +0000 UTC
4|remark42 | remark42  | 2024/04/11 03:44:24.533 [INFO]  {logger/logger.go:134 logger.(*Middleware).Handler.func1.1} GET - /api/v1/find?site=storieswithdice.com&url=https://storieswithdice.com/Blog/Sword-and-Sorcery-fiction---an-online-class&sort=-active&format=tree - remark42.storieswithdice.duckdns.org - 3790db6f8664 - 200 (849) - 61.12µs
4|remark42 | remark42  | 2024/04/11 03:44:27.633 [DEBUG] {api/rest_private.go:198 api.(*private).updateCommentCtrl} update comment cf9b44e0-63ef-4295-a080-fc2a8b58449c
4|remark42 | remark42  | 2024/04/11 03:44:27.635 [WARN]  {rest/httperrors.go:81 rest.SendErrorJSON} can't update comment - too late to edit cf9b44e0-63ef-4295-a080-fc2a8b58449c - 400 (10) - c m/google_31686197a23f273ba0b478328c421d1b768554ef - /api/v1/comment/cf9b44e0-63ef-4295-a080-fc2a8b58449c?site=storieswithdice.com&url=https://storieswithdice.com/Blog/Sword-and-Sorcery-fiction---an-online-class - [rest/api/rest_private.go:229 api.(*private).updateCommentCtrl]
4|remark42 | remark42  | 2024/04/11 03:44:27.635 [INFO]  {logger/logger.go:134 logger.(*Middleware).Handler.func1.1} PUT - /api/v1/comment/cf9b44e0-63ef-4295-a080-fc2a8b58449c?site=storieswithdice.com&url=https://storieswithdice.com/Blog/Sword-and-Sorcery-fiction---an-online-class - remark42.storieswithdice.duckdns.org - 3790db6f8664 - 400 (109) - 1.394208ms - {"delete":true,"site":"storieswithdice.com"}

seems it identifies it as an edit, not a delete?

EDIT: I can delete any comments when logged in as an Admin.

paskal commented 3 months ago

Hello, you are affected by bug https://github.com/umputun/remark42/issues/1737 which is fixed in master and will be fixed in version 1.13.0 once it's released.

paskal commented 2 months ago

It's released now, feel free to test it. Please reopen if problem persists.