Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n(zh-cn): Add content-loader-returns-invalid-id.mdx #10809

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/content/docs/zh-cn/reference/error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/

- [**UnknownCSSError**](/zh-cn/reference/errors/unknown-csserror/)<br/>Unknown CSS Error.
- [**CSSSyntaxError**](/zh-cn/reference/errors/csssyntax-error/)<br/>CSS Syntax Error.

## Markdown 错误

- [**UnknownMarkdownError**](/zh-cn/reference/errors/unknown-markdown-error/)<br/>Unknown Markdown Error.
Expand All @@ -95,17 +96,20 @@ githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/
- [**UnknownConfigError**](/zh-cn/reference/errors/unknown-config-error/)<br/>Unknown configuration error.
- [**ConfigNotFound**](/zh-cn/reference/errors/config-not-found/)<br/>Specified configuration file not found.
- [**ConfigLegacyKey**](/zh-cn/reference/errors/config-legacy-key/)<br/>Legacy configuration detected.

## CLI 错误

- [**UnknownCLIError**](/zh-cn/reference/errors/unknown-clierror/)<br/>Unknown CLI Error.
- [**RenderUndefinedEntryError**](/zh-cn/reference/errors/render-undefined-entry-error/)<br/>Attempted to render an undefined content collection entry.
- [**GenerateContentTypesError**](/zh-cn/reference/errors/generate-content-types-error/)<br/>Failed to generate content types.

## 内容集合错误

- [**UnknownContentCollectionError**](/zh-cn/reference/errors/unknown-content-collection-error/)<br/>Unknown Content Collection Error.
- [**GetEntryDeprecationError**](/zh-cn/reference/errors/get-entry-deprecation-error/)<br/>Invalid use of `getDataEntryById` or `getEntryBySlug` function.
- [**InvalidContentEntryFrontmatterError**](/zh-cn/reference/errors/invalid-content-entry-frontmatter-error/)<br/>Content entry frontmatter does not match schema.
- [**InvalidContentEntryDataError**](/zh-cn/reference/errors/invalid-content-entry-data-error/)<br/>Content entry data does not match schema.
- [**ContentLoaderReturnsInvalidId**](/zh-cn/reference/errors/content-loader-returns-invalid-id/)<br/>Content loader returned an entry with an invalid `id`.
- [**ContentEntryDataError**](/zh-cn/reference/errors/content-entry-data-error/)<br/>Content entry data does not match schema.
- [**ContentLoaderInvalidDataError**](/zh-cn/reference/errors/content-loader-invalid-data-error/)<br/>Content entry is missing an ID
- [**InvalidContentEntrySlugError**](/zh-cn/reference/errors/invalid-content-entry-slug-error/)<br/>Invalid content entry slug.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Content loader returned an entry with an invalid id.
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---

> **错误信息示例:**<br/>
集合 **blog** 的内容加载器返回了一个具有无效 `id` 的条目:<br/>
&#123;<br/>
"id": 1,<br/>
"title": "Hello, World!"<br/>
&#125;

## 哪里出了问题?
内容加载器返回了无效的 `id`。
请确保条目的 `id` 为字符串。
有关更多信息,请参阅 [内容集合文档](/zh-cn/guides/content-collections/)。
Loading