Here is some documentation about the process I used to solve some issues with hotfolder and the features module. I was doing this partly through the web interface and partly through a console, so this is a reconstruction of what I remember and the console log. 

 

I was getting the following error message when I tried to check hotfolder watches (see https://www.drupal.org/node/2453659):

Notice: Undefined property: stdClass::$field_watch_config_scheme

 

That error is related to the field not being properly configured by the features module. The way to fix this is to 'revert' the feature. That's a real pain to do unless you're using drush.

So... Log into a console on the server and change to the sites directory for your site. I use KiTTY.

First, let's update drush:
  > composer global update

 

Reverting a feature is done like this:
  > drush features-revert hotfolder -y

However, features won't detect any changes unless you clear its codecache variable first.

   > drush variable-delete features_semaphore

Now you can revert the feature.

   > drush features-revert hotfolder -y

 
Attempting to revert the feature resulted in this exception:

   exception 'FieldException' with message 'Cannot change an existing field's entity_types property.'

But that's not very helpful because it's too vague, so I changed the code to tell me more details (/modules/field/field.crud.inc, approx line 237):

  throw new FieldException("Cannot change an existing field's entity_types property.\n--- Field: ".$field['field_name'].$field['entity_types']);

 

The features settings on the web page (/admin/structure/features/hotfolder), showed it was stuck rebuilding the fields.
To make features try again to rebuild fields, delete this variable:

   > drush variable-delete features_semaphore

 

At some point, the module wouldn't install properly, and was giving me the field exception. (there is a lot of repeating commands, so remember that you can select a command from the console history using up-arrow.)

   > drush dre hotfolder -y      # disable, uninstall (remove) and re-enable the module

This was giving me exceptions, like 

   exception 'FieldException' with message 'Cannot change an existing field's entity_types property.
   --- Field: job_record_actions

The answer to that is

   > drush field-delete field_job_record_actions

... and then try to disable/uninstall/reenable again, which most of the time resulted in a different field causing the exception. Keep repeating these steps until the module is installed without giving an exception.

Sometimes I got an exception like this:

  exception 'DatabaseSchemaObjectExistsException' with message 'Table field_data_field_job_record_retries already exists.'

The answer to that is to delete the table in the database. I don't know if there is a drush command for that. And then try the reinstall command, etc.


And then... finally... this should work and hopefully features will show hotfolder as enabled and not rebuildling anything:

  > drush features-revert hotfolder -y

 

So with the module installed properly and its features fixed, everything should work now.

 

Here's another handy drush command

  > drush cc all   # clear all caches

 

Tags

Traffic Question 15: Mailing a letter

Traffic Question 15:

During a period of heavy traffic, you want to mail a letter and then head in the direction of the pink arrow. How do you do it?

  1. Stop at Mailbox A, then do a U turn
  2. Park in a spot near Mailbox A, then turn left out of the parking lot
  3. Use Mailbox A, then use the left turn lane at the intersection to do a legal U turn
  4. Turn right at the main street, turn left into the parking lot for Mailbox B, then go through the intersection in the desired direction

Traffic Question 14: A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

Traffic Question 14:

A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

  1. Stomp on the gas pedal and zoom through
  2. Continue through the intersection without any change in speed
  3. Wait until the last second and then stomp on the brake
  4. Start coming to a gradual stop immediately
  5. None of the above

Traffic Question 9: If you get a phone call while you’re driving, what do you do?

traffic-09q.pngTraffic Question 9: If you get a phone call while you’re driving, what do you do?

A. Answer it right away

B. Wait until you get to a stop light and call back.

C. Stop at a stop sign and call back.

D. See who it is. If you think it might be an emergency, park the car in a designated parking area and then call back.

(Yes, this is pretty similar to #2 If you get a text while you’re driving... The main difference is, texting on the phone is illegal whereas talking on the phone is legal. At least in Moline.)

Traffic Question 12: Which of the following are factors in whether or not a vehicle is going to be slower than normal?

Traffic Question 12:

Which of the following are factors in whether or not a vehicle is going to be slower than normal?

* Car is Buick, Cadillac, or similar type

* One or more children are present

* Vehicle is a minivan

* Age of driver is over 60

* Handicapped license plates

* Driver is using cell phone

* Vehicle is a "sporty" color

* Driver is female

Traffic Quiz 6: Is it possible to back out of a driveway and use only one lane?

traffic-06q.pngTraffic Question 6:

The blue dots indicate the path used to pull IN the driveway.

Is it possible to back out of a driveway and head in the direction indicated by the pink arrow, using only one lane of the road?

A. No, one lane is not enough room.

B. Yes, it can be done in one lane.