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).

Comments

aidanlis’s picture

Yeh there does seem to be a bug in the implementation of hook_field_delete_field() ...

r_honey’s picture

Yeah, it happens to me too...

vitok-dupe’s picture

same.

drupalgideon’s picture

subscribe

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.

Jerome F’s picture

I 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)

Dabitch’s picture

Subscribing.

jeffwidman’s picture

subscribe

Hamid.D’s picture

Is there any patch to fix this?

baby.hack’s picture

Just got the same thing.

h0tw1r3’s picture

Title: Notice while deleting field (which wasn't a file field) » Not cleaning up filefield_paths table and Notice while deleting field (which wasn't a file field)
StatusFileSize
new765 bytes

Notice 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.

h0tw1r3’s picture

Status: Active » Needs review

Test patch above please.

h0tw1r3’s picture

Status: Needs review » Fixed

Fix applied to 7.x-1.x-dev in commit 00fd741.

Status: Fixed » Closed (fixed)

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