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

help: discussion is correcty created, but reading causes a 404 #1347

Closed
harrybin opened this issue Apr 10, 2024 · 5 comments
Closed

help: discussion is correcty created, but reading causes a 404 #1347

harrybin opened this issue Apr 10, 2024 · 5 comments

Comments

@harrybin
Copy link

Hi,
in my case the discussions are correctly created, e.g. when using the thumb up below a post.
But loading the post page again does not show it, the call to giscus causes a 404:
Site: https://harrybin.de/posts/joinmeatdotnetdayfranken2024/
Discussion: harrybin/harrybin.github.io#5
Error:

Request URL: https://giscus.app/api/discussions?repo=harrybin/dev_blog&term=posts/joinmeatdotnetdayfranken2024/&category=General&number=0&strict=false&last=15
Request Method: GET
Status Code: 404 Not Found

Any idea what's the problem?

@hntan
Copy link

hntan commented May 19, 2024

I have the same issue with my github page. I'm using gohugo with this theme https://themes.gohugo.io/themes/hugo-theme-tailwind/
And this is my configuration

  [params.giscus]
    enabled = true
    repo = "hntan/hntan.github.io"
    repoID = "167350460"
    category = "General"
    categoryID = "41801912"
    mapping = "pathname"
    strict = "0"
    reactionsEnabled = "1"
    emitMetadata = "0"
    inputPosition = "bottom"
    lang = "en"

@ElastiCourse
Copy link

@hntan I see your blog has the giscus comments functional now. Can you share how you got it working? It seems that multiple users have the same issue.

@hntan
Copy link

hntan commented Aug 12, 2024

@ElastiCourse , Those IDs are actually generated by Giscus, not GitHub. To retrieve them, visit https://giscus.app/ and enter your repository and category information. Then, simply copy the generated ID.

Screenshot 2024-08-13 at 05 52 32 Screenshot 2024-08-13 at 05 53 07

@ElastiCourse
Copy link

ElastiCourse commented Aug 16, 2024

@hntan I seem to have found the issue. The https://giscus.app/ was giving incorrect repo ID (missing one character at the end). For some reason when I entered the repo name again today, it gave the correct FULL repo ID.
2024-08-16_01-56

For anyone having issues with giscus 404/400 errors, verify the repo ID configured is correct. Here is an example curl command that you can run without login (change owner and repo name & make sure jq is installed)

curl -s "https://api.github.com/repos/ElastiCourse/ElastiCourse-community" | jq '.node_id'

Output:

"R_kgDOMiAWtw"

@harrybin
Copy link
Author

this seemed to be the issue in my case too.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants