<HydraAdmin/> page remain empty despite successful XHR requests
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- react, typescript
調査の方向性
HydraAdmin と ResourceGuesser を含む React ページから始め、次に dataProviders/dataProviderHydra と、期待される Hydra コレクションの形状を示している成功した XHR レスポンスを調べます。クリーンな 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
api-platform/admin#631 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/admin#626 · コメント 1 件 · リアクション 1 件 ·
api-platform/admin の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100