I have spent 14 hours attempting to determine why this does not work, but I do not have a clear reason. I installed the commerce downloads module and it worked for assigning files, but on my custom (non commerce downloads) setup, the file license is not assigned. The rules are all set to default and the only difference I see between the two installs are differently named rules (but same tasks) and differently ordered (but same weight) rules.

I rarely mark tasks as critical, but this but appears to definitely be occurring and I have repeated it on two different installs.

Comments

ron williams’s picture

Priority: Critical » Major

Finally tracked down the issue:
The field commerce_file_line_item_files was missing from admin/commerce/config/line-items/product/fields. With the commerce_downloads profile the field is automatically created; however, with the current version it is not. I used a feature to import the line item and file orders began working.

jurriaanroelofs’s picture

Thanks for figuring this out, I also have the problem of file licenses not being created&activated.

How exactly does the fix work? I'm not really sure what you mean by commerce_file_line_item_files

When I go to the line items path you posted I get a blank. I also get a blank at admin/commerce/config/line-items. But I do have a product type with a "Commerce File" field so I'm not sure what this line item business has to do with it.

ron williams’s picture

In my case, I created a new install using commerce downloads and created a feature from the imported the commerce field listed at the admin URL mention in this issue. Once you have the feature, you can import it to you working site and you are set.

vladimir_e’s picture

I'm running into what seems to be the same issue as you.

Would you mind posting the feature you mention so that I can compare rules?

tvilms’s picture

Interesting. @Ron, this does seem MAJOR. I've spent another 14 hours troubleshooting Commerce File rules, issues, etc. The "commerce_file_line_item_files" field doesn't show up in the -beta3 or -dev (2/24/12) releases of Commerce File. If that's what it takes to successfully issue file licenses for download, then hopefully @recrit and other maintainers will look into it and at least put out an updated DEV version of Commerce File.

jurriaanroelofs’s picture

StatusFileSize
new2.47 KB

I got it fixed by importing the field mentioned by @1 into a feature and enabling the feature in my troubled Commerce installation.
I attached the feature to this post. It will not work on existing orders.

tvilms’s picture

Thanks for posting the feature. This is tops on my list to test out.

tvilms’s picture

@JurriaanRoelofs... Thank You! The feature worked perfectly. The new field showed up, and I was able to complete a commerce file transaction. Licenses are available for download now. Cheers to you!

bakulaw’s picture

Unable to issue license when status is set to completed? I've already tried adding the feature..., I guess the rule wont fire up.

duaelfr’s picture

The field seems to be set by the commerce_file_enable() function.

I fixed it by running
drush ev "commerce_file_enable();"

recrit’s picture

Status: Active » Fixed

closing this as it appeared to be an installation issue with a previous version

Status: Fixed » Closed (fixed)

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