<HydraAdmin/> page remain empty despite successful XHR requests
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- react, typescript
调研方向
从包含 HydraAdmin 和 ResourceGuesser 的 React 页面开始,然后检查 dataProviders/dataProviderHydra 以及成功的 XHR 响应,以确认预期的 Hydra 集合结构。使用干净的 Symfony 6.4 设置和列出的版本进行复现;完成的标准是书籍和评论资源渲染出数据表,而不是空白页面。
由索引模型根据 Issue 内容生成。
描述
API Platform version(s) affected: 3.3.3
Description
Why does my page remain empty despite successful XHR requests?
Hello everyone again,
I'm working with a page that successfully fetches data according to XHR logs.
Here's the relevant part of my @context:
{
"@context": {
"@vocab": "http://www.semese.local/api/docs.jsonld#",
"hydra": "http://www.w3.org/ns/hydra/core#",
"error": { "@id": "Entrypoint/error", "@type": "@id" },
"constraintViolationList": { "@id": "Entrypoint/constraintViolationList", "@type": "@id" },
"book": { "@id": "Entrypoint/book", "@type": "@id" },
"review": { "@id": "Entrypoint/review", "@type": "@id" }
}
}
Despite this, the page remains blank. Adding and under redirects me to /book, but still displays nothing.
For reference, I'm trying to achieve a similar functionality as seen in the API Platform demo: API Platform Admin Demo
Why are the resources not displayed, and how can I troubleshoot or fix this issue to see the data tables like in the demo?
How to reproduce
- started with a clean new symfony 6.4 project
- created 2 entities in the entity folder of the symfony project
- adjusted nelmio-cors to have no issues
- created a react frontend with
"@api-platform/admin": "^3.4.7",
"react": "^18.2.0",
"react-admin": "^4.16.17",
... and, the following react page:
import React from 'react';
import {AdminGuesser, HydraAdmin, ResourceGuesser} from "@api-platform/admin"; // Importă authProvider-ul tău
import {dataProvider} from "../dataProviders/dataProviderHydra"
import {CustomRoutes} from "react-admin";
const entrypoint = 'http://sf4.local/api/index.jsonld';
const HydraAdminPage = () => {
return (
<HydraAdmin
entrypoint={entrypoint}
dataProvider={dataProvider}
>
<ResourceGuesser name="book" />
<ResourceGuesser name="review" />
</HydraAdmin>
);
};
export default HydraAdminPage;
Possible Solution
Additional Context
same issue is happening for me with api platform 2.7.18...
- 主要语言
- TypeScript
- 星标
- 516
- 派生
- 134
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
api-platform/admin 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
api-platform/admin#616 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 64/100
api-platform/admin#660 ·
-
难度 4/5 3-5 天 新手友好度 50/100
api-platform/admin#659 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
api-platform/admin#631 · 6 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
api-platform/admin#626 · 1 条评论 · 1 个 reaction ·
查看 api-platform/admin 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
rohitg00/agentmemory#1428 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
boxlite-ai/boxlite#1729 ·
维护者通常 1 天内回复
-
detectors enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
SM260845/readme-gen#1 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
angular/angularfire#3774 ·
维护者通常 2 天内回复