Giter Site home page Giter Site logo

Loading non-stop about disqus-react HOT 8 CLOSED

disqus avatar disqus commented on June 7, 2024
Loading non-stop

from disqus-react.

Comments (8)

tterb avatar tterb commented on June 7, 2024 1

@mateja176 Thanks for providing detailed steps to reproduce this issue. I'll look into this and try to help pinpoint the cause.

from disqus-react.

tterb avatar tterb commented on June 7, 2024

@mateja176 After removing the process.env.NODE_ENV === 'production' in order to load the Disqus component in the development environment, I received this error when attempting to reproduce this issue.

Screen Shot 2019-07-09 at 11 01 37 AM

I was able to load the embedded discussion without any issues by providing a url and/or the title and identifier to the Disqus component.

ie: <Disqus url={window.location.href} /> or <Disqus title="count" identifier="count"/>

Could you try this and see if that solves your issue?

from disqus-react.

mateja176 avatar mateja176 commented on June 7, 2024

@tterb Thanks for having a thorough look. These are my findings based on your suggestion:

  1. <Disqus url={window.location.href} />
  • Typescript throws an error since url is already provided in the Disqus component ( it's injected by the withRouter HOC )
  1. <Disqus title="count" identifier="count"/>
  • Compiles without problems however the issue with the indeterminate disqus loader is still present

I've also logged the value of the disqus config to the console and everything seems normal. Moreover, I've created a branch named disqus containing changes mentioned in option two,

from disqus-react.

mateja176 avatar mateja176 commented on June 7, 2024

To make things easier I've created a minimal reproduction here

from disqus-react.

tterb avatar tterb commented on June 7, 2024

Thanks for providing the reproduction repo.
I cloned and ran the local server and again received the "We were unable to load Disqus" message. Though when I replaced the const disqusShortname = 'react-hot-starter-dev'; with my own shortname, the embedded discussion loaded as intended.

This leads me to believe that the issue may be caused by your Disqus configuration rather than a problem with the component, but I think we should be able to narrow it down with the following info:

from disqus-react.

mateja176 avatar mateja176 commented on June 7, 2024

Thanks for providing the reproduction repo.
I cloned and ran the local server and again received the "We were unable to load Disqus" message. Though when I replaced the const disqusShortname = 'react-hot-starter-dev'; with my own shortname, the embedded discussion loaded as intended.

This leads me to believe that the issue may be caused by your Disqus configuration rather than a problem with the component, but I think we should be able to narrow it down with the following info:

You were right! All that was necessary was to change the url property in the disqus config to the match the website url from the admin panel. Thank you so much for your help 🙏

from disqus-react.

mateja176 avatar mateja176 commented on June 7, 2024

@tterb It may be good to document this piece of information for others not get stuck in the same place. Would you like me to create a PR documenting from where to get the url from?

from disqus-react.

tterb avatar tterb commented on June 7, 2024

@mateja176 I'm glad we were able to track down the problem!
There's also an alternative approach that is often recommended for staging/development, though some users prefer the simplicity of using the same URL for development and production.

I agree it would be beneficial to have these options documented somewhere in the package docs, so feel free to submit a PR.

from disqus-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.