Thanks for this great module, it has me oh so close to finishing a difficult feature of our site!

Ok, so for the issues with the Rules integration.

1st, I think the download_count.rules.inc file needs to be in the module root, not in the includes folder (at least for me it works there, but not in the includes dir)

2nd, I think we need to add something like 'group' => t('Download Count'), to the array (perhaps line 14) so that the rule is in a group (and not loose in the menu). But obviously this is cosmetic and nothing to do with functionality.


3rd, after doing both those I get the Rule to appear, but upon trying to implement I get the following error (from the log): Error: Missing required module Download Count. So, I changed line 15 from

# from this
'module' => 'Download Count',
# to this
'module' => 'download_count',

I'm not sure if that is correct, but the 1st error goes away and I get a new one:

EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 731 of /~/sites/all/modules/entity/includes/entity.wrapper.inc).

Seems like its very close to working, but I've reached the limits of my Drupal knowledge. Hopefully someone else can help me out here. : )

Comments

WorldFallz’s picture

Thanks for the report.

And yep, according to #1289558: Can mymodule.rules.inc be in different directory?, the file has to be in the .module directory. I'm working on figuring out the entity error now.

WorldFallz’s picture

Status: Active » Fixed

http://drupalcode.org/project/download_count.git/commit/84879ed

ok, I've got this fixed and providing rules variables for 'downloaded file' and 'downloading user'.

bradhawkins’s picture

Just tested and everything seems to be working. Thanks!

I'll keep working with it and report back if I find any other glitches.

Status: Fixed » Closed (fixed)

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