New install of commerce module. Noticed after viewing a few videos, that the product type of "product" that came with the module did not have a price field, so I tried to add it. On save, I got this error:

    Notice: Undefined index: commerce_price in commerce_product_entity_property_info_alter() (line 111 of /home/jamsin9/jscs.com/sites/all/modules/commerce/modules/product/commerce_product.info.inc).
    Recoverable fatal error: Argument 2 passed to entity_views_field_definition() must be an array, null given, called in /home/jamsin9/jscs.com/sites/all/modules/entity/views/entity.views.inc on line 127 and defined in entity_views_field_definition() (line 149 of /home/jamsin9/jscs.com/sites/all/modules/entity/views/entity.views.inc).

After navigating away from the error, I went back to the page and the price field was there. Just to confirm, I deleted the Price field (Price with Currency widget, by the way), flushed cache, and tried to enter it again. Same error.

Comments

JSCSJSCS’s picture

Status: Active » Fixed

I downloaded and enabled the commerce repair module and ran it.

Field repair results
    All customer fields have been reconfigured
    All line_item fields have been reconfigured
    All order fields have been reconfigured
    All product fields have been reconfigured

I then checked the manage fields tab of the product type and Price was there as expected. Any attempt to edit results in "The field Price is locked and cannot be edited."

Not sure why I never go the Price Filed in the first place, but glad this is working now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Swon’s picture

Status: Closed (fixed) » Active

I have this exact same problem.
And tried to fix it for 5 hours now.

How did you access your site and install the commerce repair module?
I'm locked by the recoverable fatal error message.

rszrama’s picture

Category: bug » support
Status: Active » Closed (fixed)

People usually do this through drush in the command line; not sure what your hosting setup is like, but you might hop in IRC (either #drupal-support or #drupal-commerce) to have someone talk you through it. I'm closing this as it's unlikely the original poster will come back after 7 months to give more feedback.