Notice: Undefined index: und in commerce_product_bundle_form_alter() (line 146 of C:\Projects\masonjar7\drupal\sites\all\modules\commerce_product_bundle\commerce_product_bundle.module).
Warning: Invalid argument supplied for foreach() in commerce_product_bundle_form_alter() (line 146 of C:\Projects\masonjar7\drupal\sites\all\modules\commerce_product_bundle\commerce_product_bundle.module).

I attempted to enable locale and content translation, and adding an additional language, but this had no effect. In any case, the loop is apparently providing a value for $field that is an empty array for these bundle fields, instead of an array with a lang_code for keys.

Drupal Commerce I am using is version 7.x-1.2.

When products are selected for the product reference fields in the bundle product, the errors are gone. This causes the selection for adding to cart to be limited only to the default value chosen in the product definition.

Comments

bob.hinrichs’s picture

Issue summary: View changes

trying to add more useful info to this report

bob.hinrichs’s picture

Issue summary: View changes

add info on another scenario

olafkarsten’s picture

Priority: Major » Normal

Not sure whats going on. The code in this area isn't touched for a long time and just works, until now :/. When did this error pop up? We need some more info's, i guess. We ever need the steps to reproduce an error. Otherwise it's difficult to find a solution.

olafkarsten’s picture

Status: Active » Postponed (maintainer needs more info)
olafkarsten’s picture

Title: Error in field language code array » Change of referenced products in translated display nodes caused error
Assigned: Unassigned » olafkarsten
Status: Postponed (maintainer needs more info) » Active

I tested a fresh commerce kickstart installation with locale + content translation enabled and cannot reproduce the error. The product bundle works. I can add translated product display nodes - all works like expected.

Update: I can reproduce the error. It happens if you change the referenced products in a translated product display node.

olafkarsten’s picture

Title: Change of referenced products in translated display nodes caused error » empty product reference fields caused error
Status: Active » Closed (fixed)

Finally this has nothing to do with languages and translations. The error is caused by empty product reference field in the "bundle product". Added a check against the reference fields. Should be fixed in latest dev.

olafkarsten’s picture

Status: Closed (fixed) » Fixed

should be fixed, sorry. It's better we see freshly fixed issues for a while.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

adjust last part