The following tables in the database:
- media_youtube_metadata
- media_youtube_node_data
are not updated upon deletion of a node containing an embedded media field. The table entries for the particular nid/value remain unchanged.

The node is properly removed from the content type and node tables.

CommentFileSizeAuthor
#2 media_youtube.bug24.diff3.53 KBkobnim

Comments

Jerimee’s picture

Version: 6.x-1.2 » 6.x-1.3

same here, using 6.x-1.3

kobnim’s picture

StatusFileSize
new3.53 KB

Here is a patch to fix the problem.

I patched function media_youtube_emfield_field_extra($op, ...), and added case statements for two $ops: 'delete' and 'validate'.

case 'delete':

I check whether the deleted node contained any youtube-url's, and if so I delete the corresponding entries from the media_youtube data tables.

case 'validate':

I check whether the user deleted any youtube-url's, and if so I delete the corresponding entries from the media_youtube data tables. (The reason for using $op='validate' is that I need access to the form data in order to check whether the provider is youtube. When $op is 'validate', the form data is stored in $teaser.)

- Mindy