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.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
{
  "@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.