<HydraAdmin/> page remain empty despite successful XHR requests
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
Hướng nghiên cứu
Bắt đầu với trang React chứa HydraAdmin và ResourceGuesser, sau đó kiểm tra dataProviders/dataProviderHydra cùng phản hồi XHR thành công để xác định cấu trúc collection Hydra mong đợi. Tái hiện với thiết lập Symfony 6.4 sạch và các phiên bản được liệt kê; hoàn tất khi các resource sách và đánh giá render bảng dữ liệu thay vì một trang trống.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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...
- Ngôn ngữ chính
- TypeScript
- Star
- 516
- Fork
- 134
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của api-platform/admin
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
api-platform/admin#616 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
api-platform/admin#660 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
api-platform/admin#659 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
api-platform/admin#631 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
api-platform/admin#626 · 1 bình luận · 1 reaction ·
Tất cả issue của api-platform/admin
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100