I just rebuild my dev environment (fetch commercedev, drush make it, install it), and after install and on every page I get:
Notice: Undefined index: und in commerce_product_line_item_populate() (line 1100 of /commerce/profiles/commercedev/modules/contrib/commerce/modules/product_reference/commerce_product_reference.module).
It's this code:
// Set the unit price on the line item object.
$line_item->unit_price = array(
$language => array(
array(
'amount' => $product->purchase_price[$language][0]['amount'],
'currency_code' => $product->purchase_price[$language][0]['currency_code'],
)
)
);
And for some reason, $product->purchase_price is an empty array().
Comments
Comment #1
bojanz commentedAlso, clicking on "Add to cart" for any product gives the error:
And the product nodes in admin show the language as "Undefined language ()", I checked, their language column in the node table is empty.
Comment #2
rszrama commentedIt's probably just a version sync problem... I don't ever use drush make, so I don't know how to tell which versions it's installing, but I wonder if it isn't getting my latest dev on GitHub. It works fine if I use the installation profile on a site with the latest dev versions of everything on Drupal 7.x-1.0.
Comment #3
pcambraI had this same error yesterday after the field naming changes but updating the commercedev profile to the latest vestion from github solved it.
Comment #4
bojanz commentedYup. I replaced commerce with the version from ryan's github, reinstalled, and it's okay now. Thanks
I love it when problems fix themselves :P :)
Comment #5
abulte commentedI did a fresh checkout of the profile from GIT today, fresh install too, and I have the same errors : Notice : Undefined index: und dans commerce_product_line_item_populate() right after install.
Any idea ?
Thanks.
Comment #6
abulte commentedComment #7
adiatisOk, github version solved my problem. Thx
Comment #8
abulte commented@adiatis : maybe it solved yours, but not mine...
Comment #9
rszrama commentedThe dev version of Commerce here had gotten out of sync w/ my Git repo which is what Commerce Dev is kept synchronized with. I'm guessing that resolved issues for some people, and additionally I've converted all instances of hard-coded LANGUAGE_NONE to use entity_metadata_wrapper()... this should all be resolved now.
Comment #10
mthart commentedI have been having these same install issues today.
The first time around, I downloaded the commerce modules from Drupal.org and the install profile form GitHub, and I received this message while installing after 22 of 59 steps had completed:
"An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://commerce.localhost:8082/install.php?profile=commercedev&locale=en... StatusText: OK ResponseText: Notice: Undefined index: label in /Users/Michael/Sites/commerce/sites/all/modules/rules/modules/rules_core.rules.inc on line 125 {"status":true,"percentage":"37","message":"Completed 22 of 59.\u003cbr \/\u003eInstalled \u003cem\u003eOrder\u003c\/em\u003e module."}"
Watching it closely, it looks like it installs the Entity module, then gets to the Customer module, and then throws the error.
As you might be able to see, I am installing it under DAMP on OSX 10.6.6 (through Firefox 4.0b11).
After reading this thread, I downloaded the commerce module from Github and tried again, but got the same error.
I am also using the dev version of all the dependent modules as of today's date.
Any ideas as to the problem?
Comment #11
mthart commentedreopening due to my install error above...
Comment #12
rszrama commentedI'm pretty sure these issues are always related to dependencies. Update to the latest Rules and that error will go away.
Comment #13
mthart commentedI've tried both the dev and alpha5 versions of rules, and still get that error. I am also using D7.0 btw.
I'll try doing a complete reinstall of everything from the ground up to see if that matters, but to be clear, use latest dev versions of ALL dependent modules?
Comment #14
pcambraThis is a rules problem that has been solved in #1068094: rules_rules_core_data_info() supposes taxonomy module as installed, please update rules to the last dev or use the patch in the issue.