Errors
Notice: Undefined index: type in commerce_custom_product_line_item_type_save() (line 142 of /XXXsites/all/modules/commerce_custom_product/commerce_custom_product.module). =>
... (Array, 15 elements)
Called from /XXX/sites/all/modules/commerce_custom_product/commerce_custom_product.module, line 142
Notice: Undefined property: stdClass::$type in drupal_write_record() (line 7245 of /XXX/includes/common.inc). =>
... (Array, 16 elements)
Called from /XXX/includes/common.inc, line 7245
Notice: Undefined variable: skip_reset in commerce_custom_product_line_item_type_save() (line 162 of /XXX/sites/all/modules/commerce_custom_product/commerce_custom_product.module). =>
... (Array, 15 elements)
Called from /XXXsites/all/modules/commerce_custom_product/commerce_custom_product.module, line 162
-----------------------
How to reproduce:
1. back up database
2. create line item via web page interface
3. use features to export line item
4. drop database, create database, restore database (must drop to remove old tables)
5. install/enable new module for line items.
6. Notice on /admin/commerce/config/line-items there are TWO line item types defined with identical names, one with NULL for a machine name, one with the correct machine name
----
There is a workaround.
To solve - click on "delete" on /admin/commerce/config/line-items on the one with the NULL machine name.
Comments
Comment #1
bojanz commentedComment #2
rszrama commentedI'm not entirely sure what's going on here, but it sounds like a Features specific issue, not something in Commerce itself. You're going to get into trouble trying to export / re-define core items like the core product line item type, though 1.x-dev may support that. I'd look into the Commerce Features module and suggest improvements to better support this if necessary.
Comment #3
bojanz commentedRyan needs to learn the benefits of the Refresh button :)
Comment #4
rszrama commentedD'oh. That's what I get for using too many tabs. : P
Comment #5
bojanz commentedNotice: Undefined variable: skip_reset in commerce_custom_product_line_item_type_save() (line 162 of /XXX/sites/all/modules/commerce_custom_product/commerce_custom_product.module). =>
... (Array, 15 elements)
This is fixed by the latest commerce_custom_product -dev version.
Can you attach the feature that is causing your problem (or at least the relevant parts)?
Comment #6
fabianx commentedDuplicate of #1450910: Feature with custom line item marked "Overridden".