Magento2: Cannot Create Products in Magento 2.1.0

Created on 22 Jul 2016  路  3Comments  路  Source: magento/magento2

Steps to reproduce

  1. Install Magento 2.1.0 from Command Line (developer mode).
  2. Navigate to Magento Admin.
  3. Navigate to Simple Product creation page through Magento Admin Panel.

    Expected result

  4. Page displays Simple Product attributes to be set and saved.

    Actual result

  5. Error message appears:

"Method 'getExtensionAttributes' must be overridden in the interfaces which extend 'Magento\Framework\Api\ExtensibleDataInterface'. Concrete return type must be specified. Please fix :\Magento\Catalog\Api\Data\ProductInterface."

This is a fresh install with no extensions added and no modifications. Grouped Products will display the attribute assignment page, but will not save with the same error.

  1. Screenshots:
    groupedproduct
    simpleproduct

Most helpful comment

Well, now I feel stupid. If you are running OPCache on your server, please be sure to set the opcache.save_comments to 1 in your opcache.ini file, otherwise (if you were keen to optimize when installing and set it to 0) comments are stripped that Magento 2 requires, as shown in the generated ExtensionAttributesFactory file (checks against getDocComment()).

I hope that points anyone else in the right direction regarding this initially mind boggling issue.

That is all.

All 3 comments

I had the same problem, I notice that the price attributes does not appear among the product attributes.. The save button does not work for me so I don麓t get any error msg.

Well, now I feel stupid. If you are running OPCache on your server, please be sure to set the opcache.save_comments to 1 in your opcache.ini file, otherwise (if you were keen to optimize when installing and set it to 0) comments are stripped that Magento 2 requires, as shown in the generated ExtensionAttributesFactory file (checks against getDocComment()).

I hope that points anyone else in the right direction regarding this initially mind boggling issue.

That is all.

set the opcache.save_comments to 1 in your opcache.ini

It works! Thanks.

Was this page helpful?
0 / 5 - 0 ratings