MDVA-43348: Gift Card GraphQL-Anfrage zeigt Fehler an

Der Patch MDVA-43348 behebt das Problem, bei dem die GraphQL-Anfrage der Gift-Karte einen Fehler anzeigt, wenn gift_card_options "uid"enthält. Dieser Patch ist verfügbar, wenn das Quality Patches Tool (QPT) 1.1.12 installiert ist. Die Patch-ID lautet MDVA-43348. Bitte beachten Sie, dass das Problem in Adobe Commerce 2.4.5 behoben sein soll.

Betroffene Produkte und Versionen

Der Patch wird für die Adobe Commerce-Version erstellt:

  • Adobe Commerce (alle Bereitstellungsmethoden) 2.4.2

Kompatibel mit Adobe Commerce-Versionen:

  • Adobe Commerce (alle Bereitstellungsmethoden) 2.4.2 - 2.4.4
NOTE
Der Patch kann für andere Versionen mit den neuen Versionen des Quality Patches Tool angewendet werden. Um zu überprüfen, ob der Patch mit Ihrer Adobe Commerce-Version kompatibel ist, aktualisieren Sie das Paket magento/quality-patches auf die neueste Version und überprüfen Sie die Kompatibilität auf der Seite Quality Patches Tool: Suchen nach Patches. Verwenden Sie die Patch-ID als Suchschlüsselwort, um den Patch zu finden.

Problem

Die GraphQL-Anfrage für die Gift-Karte zeigt einen Fehler an, wenn gift_card_options "uid"enthält.

Zu reproduzierende Schritte:

  1. Erstellen Sie ein Geschenkkarteprodukt.
  2. Führen Sie eine Neuindizierung durch.
  3. Führen Sie einen GraphQL-Aufruf durch, bei dem der URL-Schlüssel "Geschenkkarte"lautet:

query getProductOptionsForProductPage_bypassFastly($urlKey: String!) {
  products(filter: { url_key: { eq: $urlKey } }) {
    items {
      id
      url_key
      ... on GiftCardProduct {
        allow_open_amount
        open_amount_min
        open_amount_max
        giftcard_type
        is_redeemable
        lifetime
        allow_message
        message_max_length
        gift_card_options {
          uid
          title
          required
        }
      }
    }
  }
}

Erwartete Ergebnisse:

Die Daten der Geschenkkarte werden auf Anfrage zurückgegeben.

Tatsächliche Ergebnisse:

Der folgende Fehler tritt bei der Anforderung von Gift Card-Daten auf:


{
  "errors": [
    {
      "debugMessage": "Cannot return null for non-nullable field \"CustomizableFieldOption.uid\".",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 16,
          "column": 1
        }
      ],
      "path": [
        "products",
        "items",
        0,
        "gift_card_options",
        0,
        "uid"
      ]
    },
    {
      "debugMessage": "Cannot return null for non-nullable field \"CustomizableFieldOption.uid\".",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 16,
          "column": 1
        }
      ],
      "path": [
        "products",
        "items",
        0,
        "gift_card_options",
        1,
        "uid"
      ]
    },
    {
      "debugMessage": "Cannot return null for non-nullable field \"CustomizableFieldOption.uid\".",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 16,
          "column": 1
        }
      ],
      "path": [
        "products",
        "items",
        0,
        "gift_card_options",
        2,
        "uid"
      ]
    },
    {
      "debugMessage": "Cannot return null for non-nullable field \"CustomizableFieldOption.uid\".",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 16,
          "column": 1
        }
      ],
      "path": [
        "products",
        "items",
        0,
        "gift_card_options",
        3,
        "uid"
      ]
    },
    {
      "debugMessage": "Cannot return null for non-nullable field \"CustomizableFieldOption.uid\".",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 16,
          "column": 1
        }
      ],
      "path": [
        "products",
        "items",
        0,
        "gift_card_options",
        4,
        "uid"
      ]
    }
  ],
  "data": {
    "products": {
      "items": [
        {
          "id": 2,
          "url_key": "gitf-card",
          "allow_open_amount": false,
          "open_amount_min": null,
          "open_amount_max": null,
          "giftcard_type": "VIRTUAL",
          "is_redeemable": true,
          "lifetime": 0,
          "allow_message": true,
          "message_max_length": 255,
          "gift_card_options": [
            null,
            null,
            null,
            null,
            null
          ]
        }
      ]
    }
  }
}

Wenden Sie den Patch an

Verwenden Sie je nach Bereitstellungsmethode die folgenden Links, um einzelne Patches anzuwenden:

Verwandtes Lesen

Weitere Informationen zum Werkzeug für Qualitätsmuster finden Sie unter:

Weitere Informationen zu anderen in QPT verfügbaren Patches finden Sie unter Patches, die in QPT verfügbar sind, in unserer Entwicklerdokumentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a