I am trying to setup products with options for a client site build. The client needs to have 2 options per product to select size and product type. Setting up products manually for this in Drupal Commerce is not feasible, so I decided to go with this module. The client requires individual dropdowns for product options, so I chose the static option for each product option within the product types.

The issue is that whenever I try to setup a product type with Static fields instead of combination fields I get this error for each field.

Notice: Undefined index: values in commerce_bpc_process_fragment_field() (line 402 of ..commerce_bpc.forms.inc).

It seems as if the combination options never get fully disabled when trying to enable the Static fields option or something. If i try to create items with this error with the BPC, it throws the following errors.

Warning: implode() [function.implode]: Invalid arguments passed in commerce_bpc_tokens() (line 88 of ..commerce_bpc.tokens.inc).
Notice: Undefined index: values in commerce_bpc_tokens() (line 86 of ..commerce_bpc.tokens.inc).
Warning: implode() [function.implode]: Invalid arguments passed in commerce_bpc_tokens() (line 88 of ..commerce_bpc.tokens.inc).
Notice: Undefined index: labels in commerce_bpc_tokens() (line 91 of ..commerce_bpc.tokens.inc).
Warning: implode() [function.implode]: Invalid arguments passed in commerce_bpc_tokens() (line 93 of ..commerce_bpc.tokens.inc).

From the error message I received, I figured it was the tokens being used, so I removed the tokens for combination values, but to no avail. I still get the same error.

Please advise as I have tested this on a fresh Drupal Commerce install with the latest version of both Drupal Commerce and your module (RC3) and receive the same error. FWIW, the issue also existed in RC2.

Comments

sven.lauer’s picture

Title: Notice: Undefined index: values in commerce_bpc_process_fragment_field() » Product types that only have "static" list fields allow to display the bulk creation form.

In trying to reproduce this, I think I have happened upon your problem, but I am not sure: Are you trying to use bulk creation WITHOUT any combination-creating fields?

This is not possible (should not be possible), as not having combination-creating fields defeats the purpose of using commerce_bpc. In fact, it should not even be possible to display the bulk creation form without combination-creating fields (but there appears to be a bug that allows this, changing issue title to reflect the real bug).

I am not sure what you mean by "Setting up products manually for this in Drupal Commerce is not feasible, so I decided to go with this module."--everything that is feasible with "static values" in bpc is feasible in plain Commerce. Or are you trying to use bpc only for its display node creation functionality? This is not supported right now.

sven.lauer’s picture

Status: Active » Fixed

Fixed.

The problem was that the menu got not rebuilt after updating field settings---meaning that the issue resolved itself on the next cache clear.

Feel free to open a "support request" issue to figure out how to do what you originally intended (though as I said, it seems that this is not a commerce_bpc use case).

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

updated issue info