File fields are created with a field setting for file scheme. The fields programmatically create at install on the license and line item are set up with private file scheme. However, this scheme might not be available and might not be the scheme used for licensed files - ie Amazon S3, etc. The file fid referenced in these fields will always be the one that is on the product where an admin can set the desired scheme.

An issue occurs if an admin manually creates a new license.

  • The upload field could be set up for file scheme of private which may not be the desired scheme for the upload.
  • The upload field could be set up for a file scheme == NULL if the private file scheme was not set up before install

In previous versions of Commerce File this was not an issue since scheme was selected per widget; however, #1228854: Change file scheme settings to default file field single scheme per field opened up this new issue.

Comments

rfay’s picture

Subscribe

recrit’s picture

A temporary fix has been added per http://drupalcode.org/project/commerce_file.git/commitdiff/d428a4c for #1250966: Erroneous error message: "Commerce File requires a private file scheme".
This adds a check to not validate fields that have been added during install.

recrit’s picture

recrit’s picture

Priority: Normal » Major
recrit’s picture

Status: Active » Needs review

Changing the scheme of manually created licenses could be alleviated with the commit http://drupalcode.org/project/commerce_file.git/commit/75045cd that was a fix for #1394892: License file field allowed extensions should not be a default list

recrit’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

updated with the NULL possibility for the file scheme