[僅限PaaS]{class="badge informative" title="僅適用於雲端專案(Adobe管理的PaaS基礎結構)和內部部署專案的Adobe Commerce 。"}
MDVA-40896:非同步產品中出現「錯誤:TypeError:引數3」錯誤
MDVA-40896修補程式修正非同步產品批次API中顯示Error: TypeError: Argument 3 passed to Magento\Framework\Webapi\ServiceInputProcessor::process() must be of the type array, string given
錯誤的問題。 安裝品質修補工具(QPT) 1.1.15時,即可使用此修補程式。 修補程式ID為MDVA-40896。 請注意,問題已在Adobe Commerce 2.4.4中修正。
受影響的產品和版本
已為Adobe Commerce版本建立修補程式:
- Adobe Commerce (所有部署方法) 2.4.3
與Adobe Commerce版本相容:
- Adobe Commerce (所有部署方法) 2.4.3 - 2.4.3-p2
magento/quality-patches
套件更新至最新版本,並在Quality Patches Tool上檢查相容性:搜尋修補程式頁面。 使用修補程式ID作為搜尋關鍵字,以尋找修補程式。問題
非同步產品大量API中顯示Error: TypeError: Argument 3 passed to Magento\Framework\Webapi\ServiceInputProcessor::process() must be of the type array, string given
錯誤。
要再現的步驟:
- 使用下列裝載將要求傳送至
rest/all/async/bulk/V1/products/bySKU
端點:
[
{
"product": {
"sku": "24-MB01",
"price": 36,
"extension_attributes": {
"stock_item": {
"qty": 100,
"is_in_stock": true
}
},
"custom_attributes": [
{
"attribute_code": "new",
"value": "1"
}
]
}
},
{
"product": {
"sku": "24-MB04",
"price": 28,
"extension_attributes": {
"stock_item": {
"qty": 50,
"is_in_stock": true
}
},
"custom_attributes": [
{
"attribute_code": "new",
"value": "0"
}
]
}
}
]
預期結果:
系統會傳回產品詳細資料。
實際結果:
發生錯誤Error: TypeError: Argument 3 passed to Magento\Framework\Webapi\ServiceInputProcessor::process() must be of the type array, string given
。
套用修補程式
若要套用個別修補程式,請根據您的部署方法使用下列連結:
- Quality Patches Tool指南中的Adobe Commerce或Magento Open Source內部部署: Quality Patches Tool >使用狀況。
- 雲端基礎結構上的Adobe Commerce:雲端基礎結構上的Commerce指南中的升級和修補程式>套用修補程式。
相關閱讀
若要進一步瞭解「品質修補程式」工具,請參閱:
- 已發行品質修補程式工具:支援知識庫中可自助提供品質修補程式的新工具。
- 使用Quality Patches Tool指南中的「品質修補工具」,檢查是否有修補程式可用於您的Adobe Commerce問題。
如需QPT中其他修補程式的詳細資訊,請參閱Quality Patches Tool指南中的Quality Patches Tool:搜尋修補程式。