Skip to content

Creating Bundle Product via API - Property "BundleProductOptions" does not have accessor method "getBundleProductOptions" #38087

Closed
@chammedinger

Description

@chammedinger

Preconditions and environment

  • Magento version 2.4.5-p5

Steps to reproduce

I'm following this guide (https://developer.adobe.com/commerce/webapi/rest/tutorials/bundle-product/create-bundle-product/) to create a Bundle Product

Expected result

Creation of the Bundle Product

Actual result

As a response I get following:
{"message":"Internal Error. Details are available in Magento log file. Report ID: webapi-652d149be62d5"}

In Magento Log I get the following error:

[2023-10-16T10:46:51.943861+00:00] main.CRITICAL: LogicException: Property "BundleProductOptions" does not have accessor method "getBundleProductOptions" in class "Magento\Catalog\Api\Data\ProductInterface". in /var/www/magento2_staging/vendor/magento/framework/Reflection/NameFinder.php:103
Stack trace:
#0 /var/www/magento2_staging/vendor/magento/framework/Reflection/NameFinder.php(62): Magento\Framework\Reflection\NameFinder->findAccessorMethodName(Object(Laminas\Code\Reflection\ClassReflection), 'BundleProductOp...', 'getBundleProduc...', 'isBundleProduct...')
#1 /var/www/magento2_staging/vendor/magento/framework/Webapi/ServiceInputProcessor.php(289): Magento\Framework\Reflection\NameFinder->getGetterMethodName(Object(Laminas\Code\Reflection\ClassReflection), 'BundleProductOp...')
#2 /var/www/magento2_staging/vendor/magento/framework/Webapi/ServiceInputProcessor.php(514): Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray('Magento\\Catalog...', Array)
#3 /var/www/magento2_staging/vendor/magento/framework/Webapi/ServiceInputProcessor.php(194): Magento\Framework\Webapi\ServiceInputProcessor->convertValue(Array, 'Magento\\Catalog...')
#4 /var/www/magento2_staging/vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php(115): Magento\Framework\Webapi\ServiceInputProcessor->process('Magento\\Catalog...', 'save', Array)
#5 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest\InputParamsResolver->resolve()
#6 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->___callParent('resolve', Array)
#7 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->Magento\Framework\Interception\{closure}()
#8 /var/www/magento2_staging/generated/code/Magento/Webapi/Controller/Rest/InputParamsResolver/Interceptor.php(23): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->___callPlugins('resolve', Array, Array)
#9 /var/www/magento2_staging/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(85): Magento\Webapi\Controller\Rest\InputParamsResolver\Interceptor->resolve()
#10 /var/www/magento2_staging/vendor/magento/module-webapi/Controller/Rest.php(195): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#11 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#12 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#13 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#14 /var/www/magento2_staging/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#15 /var/www/magento2_staging/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /var/www/magento2_staging/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#17 /var/www/magento2_staging/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#18 /var/www/magento2_staging/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#19 {main}

Next Exception: Report ID: webapi-652d149be62d5; Message: Property "BundleProductOptions" does not have accessor method "getBundleProductOptions" in class "Magento\Catalog\Api\Data\ProductInterface". in /var/www/magento2_staging/vendor/magento/framework/Webapi/ErrorProcessor.php:208
Stack trace:
#0 /var/www/magento2_staging/vendor/magento/framework/Webapi/ErrorProcessor.php(153): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(LogicException))
#1 /var/www/magento2_staging/vendor/magento/module-webapi/Controller/Rest.php(197): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(LogicException))
#2 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)
#4 /var/www/magento2_staging/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#5 /var/www/magento2_staging/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(23): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#6 /var/www/magento2_staging/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#7 /var/www/magento2_staging/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#8 /var/www/magento2_staging/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#9 /var/www/magento2_staging/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#10 {main} [] []

Via the Magento Admin UI I can create the bundle product with the same properties.
Via the API I get above error.
I have already tried to clean cache end re-compile everything etc.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.5-p5Indicates original Magento version for the Issue report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions