erreur 500 dans mon api platform

Par DiegoMark, il y a 4 ans


Bonjour,
J'utilise API PLATFORM dans mon projet symfony pour connecter les sites de la carte à leur templates. Et les sites de mon API renvoient maintenant une erreur 500. Dans GET/API/SITES, j'ai le fichier json suivant, c'est le début.

{ "@context": "/api/contexts/Error", "@type": "hydra:Error", "hydra:title": "An error occurred", "hydra:description": "Entity of type 'App\\Entity\\Topo' for IDs id(0) was not found", "trace": [ { "namespace": "", "short_class": "", "class": "", "type": "", "function": "", "file": "C:\\Users\\Diego\\Dropbox\\Mon PC (DESKTOP-HPQ395F)\\Desktop\\coursSymfony - Copie\\ProjetEscalade4-4\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\EntityNotFoundException.php", "line": 46, "args": [] }, { "namespace": "Doctrine\\ORM", "short_class": "EntityNotFoundException", "class": "Doctrine\\ORM\\EntityNotFoundException", "type": "::", "function": "fromClassNameAndIdentifier", "file": "C:\\Users\\Diego\\Dropbox\\Mon PC (DESKTOP-HPQ395F)\\Desktop\\coursSymfony - Copie\\ProjetEscalade4-4\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\Proxy\\ProxyFactory.php", "line": 156, "args": [ [ "string", "App\\Entity\\Topo" ], [ "array", { "id": [ "integer", 0 ] } ] ] }, { "namespace": "Doctrine\\ORM\\Proxy", "short_class": "ProxyFactory", "class": "Doctrine\\ORM\\Proxy\\ProxyFactory", "type": "->", "function": "Doctrine\\ORM\\Proxy\\{closure}", "file": "C:\\Users\\Diego\\Dropbox\\Mon PC (DESKTOP-HPQ395F)\\Desktop\\coursSymfony - Copie\\ProjetEscalade4-4\\var\\cache\\dev\\doctrine\\orm\\Proxies\\__CG__AppEntityTopo.php", "line": 211, "args": [ [ "object", "Proxies\\__CG__\\App\\Entity\\Topo" ],

J'ai déjà corrigé des erreurs similaires 2 fois. Cette fois, Il n'y a pas d'id 0 dans l'entité topo, mais je ne vois pas comment résoudre ça. Merci pour vos conseils.

Aucune réponse