I upgraded from 1.8 which has been running for quite some time, to 1.9.

It would appear that my existing configuration didn't get fully ported over. I get the following error message when I try to check watches:
Notice: Undefined property: stdClass::$field_watch_config_scheme in _hotfolder_get_watchfolder() (line 1178 of /....../public_html/sites/all/modules/hotfolder/hotfolder.module).

I'm guessing that means there is supposed to be a table named field_data_watch_config_scheme, but I don't find such a table.

It would be helpful if there was some description about how to migrate from one version to the other, or at least how things are expected to work now. At any rate, here's what I did in my custom module:

  1. Rename callback prefixes:
  2. drop-off to drop_off
    post-creation to post_creation

  3. Instead of calling hotfolder_add_job(), call hotfolder_check_watches()
  4. Add a term to hotfolder taxonomy. I set the folder path in the term to public://my_incoming_files, which results in a message like: Checking directory public://://my_incoming_files ( ) for jobs matching .*\.mp3. and it says it found 0 files, even when there is one that should match. I tried this with "internal folders" turned on (which was how it was working before) and with it turned off and with my file in different folders where i thought hotfolder might be looking.

Comments

Bastlynn’s picture

The field is or should be - in the Features code. Try reverting the feature to get the field created? Details on that process are here:

https://www.drupal.org/node/582680

Bastlynn’s picture

For your term / path:

If your pickup location is in the public file path, then leave the terms stuff alone and just select public:// and use the path inside your public location. The taxonomy is there only to allow alternate stream wrappers such as when dealing with UNC file mounts for example. If you're putting files in the public path (default /sites/default/files/) then you don't need to change any of that, just select public://

For function name changes:

Your custom module shouldn't have to call hotfolder_add_job() or hotfolder_check_watches(). The hotfolder manages it's own cron and will look up files listed under configured watches on cron on it's own.

Bastlynn’s picture

Status: Active » Postponed (maintainer needs more info)
Bastlynn’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Since I've not heard back on this yet, I'm going to go ahead and close this out.

drewkeller’s picture

I finally got around to spending some time with this (and updated to 1.10, as well) and finally got it working.

I wrote up some documentation about how I solved the issue with the field:
http://www.drewkeller.com/blog/fixing-features-hotfolder

I also wrote up some documentation about how to configure hotfolder (at least as far as I understand it):
http://www.drewkeller.com/blog/setting-hotfolder-module-drupal

The bit about the taxonomy term... turns out I didn't need to mess with that. It's totally optional, as I mention in my write-up. I guess that's what you were saying in your comment as well.