utterance / utterances

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

issue created by utterances-bot starts with "undefined" #207

Closed nancym closed 4 years ago

nancym commented 4 years ago

I just set up utteranc.es, which was easy and it just works so thank you for this! I tested it at the bottom of https://www.ii.com/meta/connect/, which created this issue: https://github.com/nancym/ii-issues/issues/1. My questions:

Thanks you, N

PS - Comments are welcome on my site😃

nancym commented 4 years ago

Hello again, I don't know much about Javascript so I haven't tried to debug this myself (yet), but I thought of a possible reason that this is happening. I build my site with hugo --minify and, thanks to the minification, the source of my pages includes this:

<script src=https://utteranc.es/client.js repo=nancym/ii-issues issue-term=title theme=github-light crossorigin=anonymous async></script>

Note that all quotation marks were removed. Is it possible that is part of the problem?

I thought that maybe this only happens with the very first use of utteranc.es, but I just posted a comment on another page on my site and the same thing happend: The utterances-bot produced an issue that says:

undefined

https://www.ii.com/website-todo-done/

Does anyone have any suggestion for how to debug this?

Thanks!

jdanyow commented 4 years ago

utterances is not correctly handling pages which do not have a "description" meta tag.

<meta name="description" content="... a description of the blog post ...">
jdanyow commented 4 years ago

This is fixed. Thanks for reporting.

nancym commented 4 years ago

Thank you for fixing this @jdanyow!

ayushxx7 commented 3 years ago

I am facing the same problem. https://github.com/ayushxx7/ayush-mandowara-blog/issues/6#issue-860393285

ayushxx7 commented 3 years ago

https://github.com/ayushxx7/ayush-mandowara-blog/issues/8 - Here it is not undefined, but the title of the whole blog itself (not the post). Please help.

ayushxx7 commented 3 years ago

I think my issue was probably related to how my gatsby site was rendering title and description. It is fixed now! References: