Hi,
I'm using Drupal 6 and Uc2. I've been tediously going through the documentation enabling and configuring modules and thought I'd try uploading a test product and this is the error returned:
warning: Invalid argument supplied for foreach() in /home/iselldog/public_html/sites/all/modules/ubercart_marketplace/mp_file/mp_file.module on line 210.
I've tried uninstalling and reinstalling the UC Marketplace module, but the same error occurred.
There is no problem viewing the image or product and it looks like the image directory was created successfully.
I've also gone back and disabled some modules that I enabled just prior to this such as Trigger, but still get the error.
I've searched the forums, but the solutions don't work for my situation.
If anyone has time to point me in the right direction I would greatly appreciate it.
Thanks!
Heather
Comments
Comment #1
syndicateStorm commentedSeems to be a duplicate of http://drupal.org/node/784914 ? Usually this means your field name doesn't match the entry you've put on the seller's settings page. Let me know what you think...
Comment #2
mamasdiner commentedHi!
Thanks for pointing me to the other post. I too had the word "download" in the Name of Product Filefield text area. I changed it as you had suggested and still the same error.
I did not create any custom fields in the Content Types area. The only thing sellers are uploading are images and there is an Image field area with Name field_image_cache on the Content Management>Product>Manage Fields page.
I tried replacing the name on the Seller Settings page with every variation of the image name and field, but still the same error.
Any other ideas?
Thanks again for your help!
Heather
Comment #3
syndicateStorm commentedAre you selling digital or tangible products? If it is digital you will need to create a new custom field in the Content Types area. If not you can disable the mp_file module.
Comment #4
mamasdiner commentedI'm selling tangible products, but had considered adding the option to purchase digital photos via download in the future.
So, when I add the digital photo download option then I add a custom field in the Content Types area and then also name it the same under Manage Fields in Seller Settings?
How do I disable the mp_file module?
Another question, should I just create a custom field in the Content Types area for the downloads now and not worry about doing it later and run into possible problems?
Thanks so much for your help on this!
Heather
Comment #5
syndicateStorm commented>> So, when I add the digital photo download option then I add a custom field in the Content Types area and then also name it the same under Manage Fields in Seller Settings?
Yes.
>> How do I disable the mp_file module?
To disable mp_file just go to "Site building >> Modules" and disable it. It will be listed as "Marketplace File Downloads".
>> Another question, should I just create a custom field in the Content Types area for the downloads now and not worry about doing it later and run into possible problems?
Not sure I'm following you? You could create a field in the Content Types area without enabling mp_file. However, mp_file does do some manipulation with the files, such as relocating them to a secure location, etc. so if you enabled the module later, any previously created products might not behave the way you want.
Comment #6
mamasdiner commentedError Gone!
I did as you suggested and instead of disabling the module I added the file download capabilities now, even though they may not be used for awhile.
I created the field "downloadable_image" under Content Type>>Edit Product>>Manage Fields
Under Store Admin>>Configuration>>Seller Settings I changed Name of Product filefield to "downloadable_image"
I created a product and the error is gone!
Thanks so much for your help!
Heather
Comment #7
syndicateStorm commentedNo problem. Cheers!
Comment #8
mwangi commentedthe solution worked for me too - a bit differently.
I just added a new cck field to the product content type - the existing field added in the product-for-sale content type
Comment #10
colorado commentedI had this problem too, and solved it by looking at the machine-readable Field name of the File Download content type, i.e.
Since the Field name (which as it says "cannot be changed") is field_filedownload, I went over to Store Admin>>Configuration>>Seller Settings, and there I changed the Name of Product Filefield to field_filedownload so they are identical, i.e.
Comment #11
iaminawe commentedAlso check that the you are not using anything but the default file path for the filefield as this is where the file is copied from to the secure downloads folder. I was using filefield paths and had set a path for the filefield which gave me errors until I set it back to the default.