Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I installed honeypot with Drush and honeypot.css was created without Apache having the permission to write to it. When the dummy field name was changed in the admin UI the module wasn't able to update the css file leaving the field displayed.
Comments
Comment #2
poniesThis patch adds a check on file_unmanaged_save_data returning an error if Apache isn't able to update honeypot.css.
This does not revert the field name change. It just lets you know it's going to be broken when you submit it.
Comment #3
poniesComment #4
poniesComment #5
geerlingguy CreditAttribution: geerlingguy commentedOne quick nit—it looks like there are four spaces of indentation in the line inside the if statement.
Comment #6
poniesNow with fewer spaces!
Comment #7
poniesComment #8
joseph.olstadComment #9
geerlingguy CreditAttribution: geerlingguy commented@ponies / @joseph.olstad — do you know if this problem also affects D8? I'd rather not merge a patch into the D7 branch until I'm sure it's fixed in D8 as well.
Comment #10
ponies@geerlingguy I've got one D8 site in development. I'll try to test it today.
Comment #11
geerlingguy CreditAttribution: geerlingguy commented@ponies - Awesome, thanks!
Comment #12
geerlingguy CreditAttribution: geerlingguy commentedUpdating the status to reflect what this is waiting on. If I get a chance, I'll try testing in D8 as well... just haven't found the time yet.
Comment #13
bwaindwain CreditAttribution: bwaindwain as a volunteer commentedI'm experiencing this too. On drush install, honeypot works fine. The honeypot folder and css file are created on install, but they're owned by me so apache can't write to it. The config page shows error message "Unable to create Honeypot CSS directory, honeypot. Check the permissions on your files directory."
So, I can only use the default field name.
Other modules, like fontyourface, create their folder and css file on first usage, not install. They use an md5 hash. This seems like a better way which works in all situations by ensuring that the folder and files are created by apache. See discussion and commits at https://www.drupal.org/project/fontyourface/issues/1165658
Comment #14
TR CreditAttribution: TR commentedHas anyone tried to see if this problem affects the D8/D9 version of Honeypot? That is where this issue stalled > 4 years ago.