Vagr9K / gatsby-material-starter

A high performance blog starter with Material design in mind for GatsbyJS.
https://gatsby-theme-material.netlify.app/
MIT License
514 stars 178 forks source link

Unable to load disqus with category_id #70

Closed JohnCFerguson closed 4 years ago

JohnCFerguson commented 4 years ago

name: Question 🤔 about: Usage question or discussion about Gatsby Material Starter.

Summary

In the disqus component, it requres category_id, but unless I missed something in the setup of disqus for my site, category_id actually prevents the comments from loading.

Relevant information

URL: https://github.com/Vagr9K/gatsby-material-starter/blob/master/src/components/Disqus/index.jsx Current component:

          <ReactDisqusComments
            shortname={config.disqusShortname}
            identifier={post.title}
            title={post.title}
            url={url}
            category_id={post.category_id}
            onNewComment={this.notifyAboutComment}
          />

This causes the error "We were unable to load Disqus."

Working component:

          <ReactDisqusComments
            shortname={config.disqusShortname}
            identifier={post.title}
            title={post.title}
            url={url}
            onNewComment={this.notifyAboutComment}
          />

This work for me. I am wondering if there was something I missed in the setup of my disqus environment. If this is just something that has changed I will make a pull request to update this.

Environment (if relevant)

System: OS: macOS 10.15.2 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Shell: 3.2.57 - /bin/sh Binaries: Node: 12.10.0 - /usr/local/bin/node npm: 6.13.4 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 79.0.3945.88 Safari: 13.0.4 npmPackages: gatsby: ^2.18.17 => 2.18.17 gatsby-image: ^2.2.37 => 2.2.37 gatsby-plugin-catch-links: ^2.1.21 => 2.1.21 gatsby-plugin-feed: ^2.3.25 => 2.3.25 gatsby-plugin-google-analytics: ^2.1.31 => 2.1.31 gatsby-plugin-lodash: ^3.1.18 => 3.1.18 gatsby-plugin-manifest: ^2.2.34 => 2.2.34 gatsby-plugin-netlify-cms: ^4.1.33 => 4.1.33 gatsby-plugin-nprogress: ^2.1.17 => 2.1.17 gatsby-plugin-offline: ^2.2.10 => 2.2.10 gatsby-plugin-react-helmet: ^3.1.18 => 3.1.18 gatsby-plugin-sass: ^2.1.26 => 2.1.26 gatsby-plugin-sharp: ^2.3.10 => 2.3.10 gatsby-plugin-sitemap: ^2.2.24 => 2.2.24 gatsby-plugin-twitter: ^2.1.17 => 2.1.17 gatsby-remark-autolink-headers: ^2.1.21 => 2.1.21 gatsby-remark-copy-linked-files: ^2.1.33 => 2.1.33 gatsby-remark-images: ^3.1.39 => 3.1.39 gatsby-remark-prismjs: ^3.3.28 => 3.3.28 gatsby-remark-relative-images: ^0.2.3 => 0.2.3 gatsby-remark-responsive-iframe: ^2.2.30 => 2.2.30 gatsby-source-filesystem: ^2.1.43 => 2.1.43 gatsby-transformer-remark: ^2.6.45 => 2.6.45 gatsby-transformer-sharp: ^2.3.9 => 2.3.9 npmGlobalPackages: gatsby-cli: 2.8.22

File contents (if changed)

gatsby-config.js: N/A

package.json: N/A

gatsby-node.js: N/A

other files: N/A

Vagr9K commented 4 years ago

There is a default "Tech" post category that was being set during Disqus init if no categories were specified. AFAIK back in the day a category_id was required. Now that doesn't seem to be the case.

In the latest patch this behavior has been removed to prevent issues like these from popping up.

Thanks for the report!