Notice: Undefined index: duration in _commerce_file_license_property_merge() (line 420 of /Library/Server/Web/Data/Sites/RightStart/sites/all/modules/commerce_file/commerce_file.module).
Notice: Undefined index: download_limit in _commerce_file_license_property_merge() (line 420 of /Library/Server/Web/Data/Sites/RightStart/sites/all/modules/commerce_file/commerce_file.module).
Notice: Undefined index: address_limit in _commerce_file_license_property_merge() (line 420 of /Library/Server/Web/Data/Sites/RightStart/sites/all/modules/commerce_file/commerce_file.module).

The license file is created, but it doesn't pick up the default values as defined by the commerce file field. The license is created in an expired state with downloads and addresses set to 0. If I hand edit the license via the UI, adding the duration and limits, the license file works just fine. However, I continue to get this error whenever I view my license files.

I have looked at all bug reports around license file creation and tried to uninstall/resinstall the module, but still no success.

Comments

recrit’s picture

@ccollins61 - please try the latest dev since there has been a few updates regarding the actions after checkout.

  • Download the latest dev and put in your modules directory replacing the existing one
  • Run update.php
  • Clear cache (admin/config/development/performance)
  • Test again
  • Report back if success or fail

Thanks

ccollins61’s picture

Product displays added via the UI utilizing the "Reference By" widget, when editing products manually, work perfectly. However, I have been adding product display nodes via Commerce Feeds. When I check the product UI and display node UI, both look identical, whether added manually or via Commerce Feeds. However, all display nodes added via Commerce Feeds exhibit the same symptom. I suspect a missing trigger somewhere in the process.

Commerce File 7.x-1.0-beta3+10-dev
Feeds 7.x-2.0-alpha4
Commerce Feeds 7.x-1.2
Commerce Downloads Feature 7.x-1.0-beta1

ccollins61’s picture

field_purchaseable_file_data is an empty array when products are loaded with Commerce Feeds. By manually populating the array, the issue goes away for any new purchases.

update field_data_field_purchaseable_file set field_purchaseable_file_data =
'a:3:{s:8:"duration";i:-1;s:14:"download_limit";i:-1;s:13:"address_limit";i:-1;}'

recrit’s picture

Priority: Major » Normal
Status: Active » Fixed

i've added some logic to protect against the properties not being defined, so the notices you were getting should go away.
committed per: http://drupalcode.org/project/commerce_file.git/commit/239584f

Feeds not setting the default values - this would be cause by however you are populating the field with the feeds data. Currently, Commerce File does not have native feeds support. @see #1249114: Add Commerce File field mapping and #1162602: Feeds support for Commerce File

Status: Fixed » Closed (fixed)

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