If I have at least 1 item in the shopping cart, and I view it, then the following error is displayed:

Notice: Undefined index: #line_item_id in commerce_cart_form_alter() (line 188 of \xampp\htdocs\commerce\profiles\commerce_kickstart\modules\commerce\modules\cart\commerce_cart.module).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of \xampp\htdocs\commerce\includes\entity.inc).

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of \xampp\htdocs\commerce\includes\entity.inc).

With no items, there are no errors. FWIW, other than Drupal Commerce, I have Commerce Coupon installed.

Thanks in advance :).

Comments

rszrama’s picture

Have you altered your shopping cart form View?

TahitiPetey’s picture

No, I have not. As a further note, this seems to only appear to users with the administrator role, but not to regular authenticated users...

rszrama’s picture

Priority: Major » Normal
Status: Active » Fixed

To be honest, I suspect the Coupon module has a bug that's causing you to see that error. I've never seen anything of the sort in my test sites, and I've never used Commerce Coupon. That said, I can add a little failsafe to the Cart module's code to prevent the error from happening. The only problem is it's just going to hide the problem in some other module.

Commit: http://drupalcode.org/project/commerce.git/commitdiff/a7f8ef3

Status: Fixed » Closed (fixed)

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