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

bojanz’s picture

Project: Commerce Core » Commerce Features
Version: 7.x-1.4 » 7.x-1.x-dev
Component: Line item » Code
Priority: Minor » Normal
rszrama’s picture

Project: Commerce Features » Commerce Core
Version: 7.x-1.x-dev » 7.x-1.4
Component: Code » Line item
Category: bug » support
Status: Active » Closed (won't fix)

I'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.

bojanz’s picture

Project: Commerce Core » Commerce Features
Version: 7.x-1.4 » 7.x-1.x-dev
Component: Line item » Code
Category: support » bug
Status: Closed (won't fix) » Active

Ryan needs to learn the benefits of the Refresh button :)

rszrama’s picture

D'oh. That's what I get for using too many tabs. : P

bojanz’s picture

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)

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)?

fabianx’s picture

Status: Active » Closed (duplicate)