utterance / utterances

:crystal_ball: A lightweight comments widget built on GitHub issues
https://utteranc.es
MIT License
8.7k stars 565 forks source link

Comments disappearing/re-appearing #120

Closed dexygen closed 5 years ago

dexygen commented 5 years ago

The test comments I am leaving on my blog post https://dexygen.github.io/blog/articles/2019/01/04/AccidentallyDeclarative.html are disappearing/re-appearing. There should be two comments "test" and "where did my comment go", but only one of them ever appears, and it alternates. In fact, a hard refresh caused it to change (but not change back on a subsequent hard refresh). The two issues/comments can be found here: https://github.com/dexygen/ghio-comments-accidentally-declarative/issues

thumbsu commented 5 years ago

I think I have a same problem. https://quizzical-payne-46b418.netlify.com

jdanyow commented 5 years ago

@dexygen there's a race condition in your blog template / javascript.

The page begins with:

<title>Dexygen: Software, Powerful and Simple</title>

Sometime later a script is changing the title: image

This is causing a different issue to load depending on whether the script has changed the title before utterances runs.

I recommend using pathname to avoid issues like this.

 <script src="https://utteranc.es/client.js"
         repo="dexygen/ghio-comments-accidentally-declarative"
-        issue-term="title"
+        issue-term="pathname"
         theme="github-light"
         crossorigin="anonymous"
         async>
 </script>
dexygen commented 5 years ago

@jdanyow Makes sense. I will follow your recommendation, keep an eye out for a couple of days, then let you know if you can close this. Thanks for your attention.

dexygen commented 5 years ago

@jdanyow I've tested with 3 comments and everything's working as expected for me now

jdanyow commented 5 years ago

Great news- closing this 🍻

bmh8993 commented 3 years ago

@jdanyow hi, I use pathname in issue-term but, still appear and disappear....