cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving attributes from attributes set via WEB API

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Retrieving attributes from attributes set via WEB API

 Hello,

 

When I'm trying to retrieve attributes from attributes set using link like 'http://localhost:60000/rest/V1/products/attribute-sets/4/attributes' I'm experiencing such exception

{

"message": "Internal Error. Details are available in Magento log file. Report ID: webapi-56e2d6a9050c8"
}
and in /var/log/exception.log I've got the following:
 
 [2016-03-11 14:31:05] main.CRITICAL: exception 'ReflectionException' with message 'Report ID: webapi-56e2d6a9050c8; Message: Class does not exist' in /var/www/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:194
Stack trace:
#0 /var/www/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(ReflectionException))
#1 /var/www/app/code/Magento/Webapi/Controller/Rest.php(163): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(ReflectionException))
#2 /var/www/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/lib/internal/Magento/Framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /var/www/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []
 
 
After some debugging I've found that problem beginning in the class
Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php in the method getSource() when $this->_getDefaultSourceModel() returns null for "select" type attributes. If I remove select type attributes from attributes set I've got a successful report. This problems occurs with version 2.0.0 and 2.0.2 CE
Anyone else experienced such problems?
 
2 REPLIES 2

Re: Retrieving attributes from attributes set via WEB API

Issue is easily repeatable, make a fresh install of magento 2.0.2. In admin panel add "manufacturer" attribute to default attribute set and point a web browser to 'http://localhost:60000/rest/V1/products/attribute-sets/4/attributes'

Re: Retrieving attributes from attributes set via WEB API

What exact class "does not exist"?