question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't set categories for my posts

See original GitHub issue

Describe the bug

We are passing the categories to the post by the settings and it is not reflected on the Disqus dashboard.

To Reproduce

Steps to reproduce the behavior:

  1. First, setup the next code:
  <DiscussionEmbed
              shortname={DISQUS_SHORT_NAME}
              config={{
                url: postURL,
                identifier: slug,
                title: titleEn,
                /*
                Must be
                First tag: category
                Others: order does not matter
                */
                category_id: DISQUS_CATEGORIES[tags[0]?.slug],
              }}
            />

where:

const DISQUS_CATEGORIES = {
  general: "8664428",
  "front-end": "8755878",
  "back-end": "8755881",
  "deep-learning": "8755886",
  "video-games": "8755887",
}
  1. Publish a new blog on your site with front-end as first tag., it uses NextJS 10.0.5.
  2. Go to the dashboard, Tools > Discussions.
  3. The new post will have General as its category.

Expected behavior

As the first tag front-end, we should see it as the discussions category.

Specifications:

  • OS: OsX.
  • Package version: 1.0.10.
  • Node version: 12.x.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tterbcommented, Mar 18, 2021

@SalahAdDin I’m gonna assume that this solution worked and close this out, but you can reopen the issue if you’re still experiencing issues.

1reaction
tterbcommented, Mar 6, 2021

@SalahAdDin Thanks for the report. It looks like the package isn’t configured to handle the category variable and pass it to the disqus_config. It shouldn’t take too much work to add this functionality, so I can try to put up a PR in the next couple days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to add categories to posts - WordPress.org
I can add the category in Posts-> Category and under individual Posts, however, whenever I click save, the new category I created just...
Read more >
Topic: can't add categories | WordPress.com Forums
Hi, I am having trouble adding categories too. It just won't accept them. The only way I have found around this is to...
Read more >
Cannot add / edit categories to a post anymore
I tried reassigning them, but it does not work: WordPress does not save the categories, so the post ends in the default "unclassified"...
Read more >
How to Add Categories to Posts and Menu in WordPress
Your browser can't play this video. ... applied to your posts. The tutorial also teaches how to add the categories to the menu....
Read more >
Wix Blog: Creating and Managing Blog Categories | Help Center
Categories are a great way to sort your blog into different topics and give your readers a general idea what your blog posts...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found