<HydraAdmin/> page remain empty despite successful XHR requests
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- react, typescript
Research direction
Start with the React page containing HydraAdmin and ResourceGuesser, then inspect dataProviders/dataProviderHydra and the successful XHR response for the expected Hydra collection shape. Reproduce with the clean Symfony 6.4 setup and the versions listed; done means the book and review resources render data tables rather than a blank page.
Written by the indexing model from the issue text.
Description
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...
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api-platform/admin
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
api-platform/admin#616 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
api-platform/admin#660 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
api-platform/admin#659 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
api-platform/admin#631 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#626 · 1 comment · 1 reaction ·
All issues in api-platform/admin
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100