When commerce files are attached to product variant, changes to access limits are reset to defaults upon saving.

Because the default time limit is Inherit (0), so the files are never made available.

CommentFileSizeAuthor
#1 Screen Shot 2013-03-07 at 8.57.54 AM.png73.92 KBnigelw
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nigelw’s picture

I am seeing this as well.

screenshot

In the dblog I see

Type:rules
Date:Monday, March 4, 2013 - 7:56am
User:admin
Location:http://www.mywebsite.com/checkout/122/payment/return/3g-CgSCv_UelaJk2hZsSHXQAv5PVZY-7rpry_ISXS2I?tx=3SN943993Y963363N&st=Completed&amt=0.25&cc=USD&cm=&item_number=
Referrer:blank
Message:Unable to evaluate action commerce_file_license_issue_order.
Severity:warning
cigotete’s picture

I have the same behavior, but there is no dblog messages related. In the file field configuration the default values are UNLIMITED, but the 'time limit' value displayed (inherited?) by each product is Inherit (0).

For if is useful, I am creating programmatically the products, so I have added in the data array the desired values:

<?php
$file = (object) array(
		'uri' => $filepath,
		'filename' => $file_name,
		'filemime' => file_get_mimetype($filepath),
		'status' => 1,
		'data' => array(
					'duration' => COMMERCE_FILE_FIELD_UNLIMITED,
					'download_limit' => COMMERCE_FILE_FIELD_UNLIMITED,
     					'address_limit' => COMMERCE_FILE_FIELD_UNLIMITED
					)
	);
?>

I know that this is not a solution for the issue, is just for if is useful for someone who has the issue in that context because is a way to bypass the issue.

davvid’s picture

In bdlog i have:

Unable to modify data "created-product:field-sklep-pdf-file:data:duration": Invalid data value given. Be sure it matches the required data type and format.

I try execute php code in rules that return a value but with no success.

Any ideas?

DamienMcKenna’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Issue summary: View changes