Our users are reporting seeing this message when adding items to their cart:
"You cannot upload a file. Commerce File requires a private file scheme. Visit admin/config/media/file-system to set your private file path. Optionally, a private scheme other than Drupal's may be implemented.
There are private file schemes available on your system. Visit the field settings to select a private scheme allowed for this field."
I have tried to reproduce this notice but I can never get it to show, so not exactly sure what they are doing to see it. The add to cart buttons are coming from a view of multiple products. I looked in the logs and have found the next 2 errors about the time the users are reporting seeing this message. These 2 errors are always together:
Notice: Undefined index: line_item in commerce_cart_add_to_cart_form_validate() (line 1937 of /var/www/vhosts/aggdata.com/httpdocs/sites/all/modules/commerce/modules/cart/commerce_cart.module).
Followed by
EntityMalformedException: Missing bundle property on entity of type commerce_line_item. in entity_extract_ids() (line 7633 of /var/www/vhosts/aggdata.com/httpdocs/includes/common.inc).
For the time being I added an isset($form_state['line_item']) before it runs the validate function being referenced in that first error. From all my tests though, it is always set, so I never see the message.
Any ideas what this is all about?
Comments
Comment #1
bojanz commentedHi. Did you get to the bottom of this problem?
Asking first because it's been a few months since you posted this.
The first error indicates that the private filesystem is not really configured at admin/config/media/file-system, but I assume you've done that already.
Comment #2
bojanz commentedNo response in a long time.