Comments (8)
@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.
@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.
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.
@tterb Thanks for having a thorough look. These are my findings based on your suggestion:
<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 )
<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.
To make things easier I've created a minimal reproduction here
from disqus-react.
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:
- Can you check that you have access to https://react-hot-starter-dev.disqus.com/admin/settings/general/ and that the shortname matches?
- What is the URL that is associated with the shortname on Disqus? Do you have any trusted domains set?
- Have you tried providing the site URL that was registered on Disqus as the
url
attribute for thedisqusConfig
?
from disqus-react.
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 theconst 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:
- Can you check that you have access to https://react-hot-starter-dev.disqus.com/admin/settings/general/ and that the shortname matches?
- What is the URL that is associated with the shortname on Disqus? Do you have any trusted domains set?
- Have you tried providing the site URL that was registered on Disqus as the
url
attribute for thedisqusConfig
?
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.
@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.
@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)
- How do I get the image to load in the preview part of the Disqus homepage? HOT 2
- React 18 Support HOT 3
- Got a bunch of error when using disquss with Nextjs also got a CORS HOT 3
- No new release after react 18 upgrade? HOT 1
- Add new language
- Code failing in production (NextJS)
- Color Scheme / Theme Not Working HOT 1
- Does this React component not support SSO feature? HOT 5
- Tree shaking - bundle size HOT 1
- A11y failures meaning my website isn't WCAG AA
- Broken link to register if the shortname is incorrect
- Document how to disable reactions
- TypeError: Super expression must either be null or a function HOT 5
- Add theme prop to switch between light and dark mode HOT 1
- No Callbacks Running
- Dark Mode (Tailwind) not working HOT 5
- May `DiscussionEmbedConfig` type need `remoteAuthS3` field?
- CommentCount.js:125 Uncaught TypeError: Cannot read properties of undefined (reading 'string')
- Uncaught Error with parseColor using OKLCH color format in Next.js HOT 4
- Error: Super expression must either be null or a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disqus-react.