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

Comments Component now Fails to Load #1582

Closed
harrellbm opened this issue Nov 11, 2024 · 4 comments · Fixed by #1627
Closed

Comments Component now Fails to Load #1582

harrellbm opened this issue Nov 11, 2024 · 4 comments · Fixed by #1627
Labels
bug Something isn't working

Comments

@harrellbm
Copy link

Describe the bug
I previously had to comments component up and running on my garden. But then updated to the most recent commits and realized that it now fail to load at all. There are not errors in the console and a quick inspection looks like the afterbody div just doesn't exist anymore.

To Reproduce
Steps to reproduce the behavior:

updated branch to commit #1575

Load site with comments component

Nothing happens

Checked on desktop using chrome and edge
Checked on mobile using chrome and safari all with the same result

Expected behavior
Giscus to load

Screenshots and Source

image

You can help speed up fixing the problem by either

My Fork https://github.com/harrellbm/Quartz-Garden
Site this can be observed on https://harrellbm.github.io/Quartz-Garden/

Desktop (please complete the following information):

  • Quartz Version: [e.g. v4.1.2]
  • node Version: [e.g. v18.16]
  • npm version: [e.g. v10.1.0]
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]

Additional context
Add any other context about the problem here.

@harrellbm harrellbm added the bug Something isn't working label Nov 11, 2024
@xlinker1
Copy link

After updating and trying to use the Comments component for the first time, I ran into the same problem. I've followed all instructions in https://quartz.jzhao.xyz/features/comments . 🥺

commit 1ab9c91df1df799f7a1004200ff890b144d00f19 (HEAD -> v4, upstream/v4)
Author: Aaron Pham <contact@aarnphm.xyz>
Date:   Sun Nov 10 18:13:12 2024 -0500

    feat(mermaid): improvement navigation (#1575)

    * feat(mermaid): custom stuff

@saberzero1
Copy link
Collaborator

Can you check if #1586 fixes this issue?

@harrellbm
Copy link
Author

I can confirm the patch works perfectly! Thanks for the quick response!

@lone17
Copy link

lone17 commented Nov 29, 2024

I still encounter this issue. As I understand, the first condition disables comments if comments are absent in the frontmatter, which I believe is not the intended behaviour.

const disableComment: boolean =
!fileData.frontmatter?.comments || fileData.frontmatter?.comments === "false"
if (disableComment) {
return <></>

I also looked at @harrellbm's fork to see why it worked for him. Turns out he applied the fix manually and mistakenly removed the return statement after the check.

https://github.com/harrellbm/Quartz-Garden/blob/384db9163d48a327a66a0aeb156be3df8a2af58c/quartz/components/Comments.tsx#L30-L33

Just a quick fix so I made the PR at #1625.

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