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.

Not able to render the docs due to faulty metadata file?

See original GitHub issue
Error: Improper sidebars.json file, document with id 'advanced-topics-inline-styles' not found. Make sure that documents with the ids specified in sidebars.json exist and that no ids are repeated.
    at _loop (/Users/aadsm/Projects/draft-js/website/node_modules/docusaurus/lib/server/readCategories.js:58:17)

I’ve debug the code in readCategories.js and noticed it’s cycling the metadata.js that is automatically generated. I believe there’s a problem with how this file handles translated and non-translated ids as it mixes both in it:

"en-advanced-topics-block-components": {
    "id": "en-advanced-topics-block-components",
    "title": "Custom Block Components",
    "layout": "docs",
    "category": "Advanced Topics",
    "next": "advanced-topics-inline-styles",
    "permalink": "docs/advanced-topics-block-components.html",
    "source": "Advanced-Topics-Block-Components.md",
    "localized_id": "advanced-topics-block-components",
    "language": "en",
    "next_title": "Next"
  },

The code in question: articles[metadata.next], checks if there is an entry in metadata for the next property, however, the nextis a non-localized id, while the metadata entries use localized ids, because of this it never finds the next, leading to error.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
JoelMarceycommented, Dec 21, 2017

@aadsm We are updating the code to make it so that the default is not to have a set language for the links and ids unless a lanaguges.js file is present.

Is there anyway you can give me access to the repo where you are developing the site so I can run some tests too?

1reaction
JoelMarceycommented, Dec 21, 2017

@aadsm Hi. I assume you are running Docusaurus 1.0.3 via docusaurus-init. This may be fixed in master that will go out with 1.0.4, which I hope to get out sometime this week.

To check to see if you get the error still, we could try installing the latest Docusaurus from master for draft-js and testing via the instructions here: https://github.com/facebook/Docusaurus/blob/master/admin/local-third-party-project-testing.md#install-from-a-local-docusaurus-repo

Or I can test this for you if you have a repo available that has your website.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix export issues in Premiere Pro - Adobe Support
Unable to render or export your Premiere Pro project? Application hangs, freezes, or becomes unresponsive while rendering or exporting?
Read more >
Web Print Status Messages - and what they mean - PaperCut
We encountered another case for STATUS= Failed: Unable to start handler to render print job that is not mentioned above. The cause is...
Read more >
Issues Uploading Documents: Common Errors, Causes, and ...
Cause A: The document is corrupted​​ Your file may be corrupted, which means there are metadata issues in the file that occurred during...
Read more >
Dynamic Rendering | Google Search Central | Documentation
Dynamic rendering is a workaround for websites where JavaScript-generated content is not available to search engines. A dynamic rendering server detects bots ...
Read more >
<head>: The Document Metadata (Header) element - HTML
Note: <head> primarily holds information for machine processing, not human-readability. For human-visible information, like top-level ...
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