On a relatively clean D7 install I just deleted a text field while creating a new content type and received the following notice:
Notice: Undefined index: node in filefield_paths_field_delete_field() (line 408 of /home/patcms/public_html/sites/all/modules/filefield_paths/filefield_paths.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | filefield_paths-delete_field_instance.patch | 765 bytes | h0tw1r3 |
Comments
Comment #1
aidanlis commentedYeh there does seem to be a bug in the implementation of hook_field_delete_field() ...
Comment #2
r_honey commentedYeah, it happens to me too...
Comment #3
vitok-dupe commentedsame.
Comment #4
drupalgideonsubscribe
Happened to me when I deleted a field I'd added to a product entity with the Commerce module too. It wasn't a node content type.
Comment #5
Jerome F commentedI have been redirected to this issue (my duplicate was http://drupal.org/node/1115490)
Subscribing
(tired of subscribing ? http://drupal.org/node/34496 - http://3281d.com/2009/03/27/death-to-subscribe-comments)
Comment #6
Dabitch commentedSubscribing.
Comment #7
jeffwidman commentedsubscribe
Comment #8
Hamid.D commentedIs there any patch to fix this?
Comment #9
baby.hack commentedJust got the same thing.
Comment #10
h0tw1r3 commentedNotice is caused because ffp is hooked into field_delete_field, which is called whenever the last instance of a field is removed. Also, the 'node' key is not available in that hook.
If you've created and removed any number of image or file fields, you would receive that error. If you check the filefield_paths table, it will have a bunch of cruft leftover also.
Anyway, changing the hook to field_delete_instance instead fixed the problem. Please test this patch.
Comment #11
h0tw1r3 commentedTest patch above please.
Comment #12
h0tw1r3 commentedFix applied to 7.x-1.x-dev in commit 00fd741.