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

Posting comments in deeply nested threads hangs #594

Closed
zorbathut opened this issue Jun 1, 2023 · 5 comments · Fixed by #658 or #713
Closed

Posting comments in deeply nested threads hangs #594

zorbathut opened this issue Jun 1, 2023 · 5 comments · Fixed by #658 or #713
Labels
bug Something isn't working P2 priority

Comments

@zorbathut
Copy link
Contributor

From cjet79:

When posting a comment in a deeply nested thread. (deep enough that any subsequent comments will be minimized. I think 9 comments deep.) When clicking "comment" the page will hang.

There is also a javascript error that gets thrown in the console:
Uncaught TypeError: comments is null
onload https://www.themotte.org/assets/js/comments_v.js?v=a90eb7d7:293
post_comment https://www.themotte.org/assets/js/comments_v.js?v=a90eb7d7:280
onclick https://www.themotte.org/post/508/culture-war-roundup-for-the-week/103865?context=8#context:1
comments_v.js:293:4
onload https://www.themotte.org/assets/js/comments_v.js?v=a90eb7d7:293
(Async: EventHandlerNonNull)
post_comment https://www.themotte.org/assets/js/comments_v.js?v=a90eb7d7:280
onclick https://www.themotte.org/post/508/culture-war-roundup-for-the-week/103865?context=8#context:1

refreshing the page will show that the comment was successfully posted

My best guess is that is an async error, and the page is trying to load the "more comments" button before the comment has been fully saved and retrieved from the server

image

@zorbathut zorbathut added bug Something isn't working P2 priority labels Jun 1, 2023
@justcool393
Copy link
Collaborator

justcool393 commented Jul 27, 2023

can reproduce, might be related to ?context???

image

image

it's worth noting the comment does actually get posted, it just doesn't get inserted into the tree.

image

it looks like there simply isn't a replies-of-<id> div anywhere in there.

compare a different leaf which does have the div, even if empty

image

justcool393 added a commit to justcool393/themotte-rDrama that referenced this issue Jul 27, 2023
zorbathut pushed a commit that referenced this issue Jul 28, 2023
@zorbathut
Copy link
Contributor Author

@zorbathut zorbathut reopened this Aug 27, 2023
@gldrk
Copy link
Contributor

gldrk commented Nov 26, 2023

There are two code paths involved here. This PR only changed the rendering for shoah’d comments (where it ironically doesn’t matter). Needless to say, someone should rewrite that template so that there aren’t two largely identical paths.

@zorbathut
Copy link
Contributor Author

Aha! That makes sense. Many thanks for doing the legwork on this, I'll get it live soon :)

@zorbathut
Copy link
Contributor Author

Should now be live!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 priority
Projects
None yet
3 participants