Active
Project:
Media: YouTube
Version:
6.x-1.3
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2011 at 22:32 UTC
Updated:
3 May 2012 at 20:14 UTC
Jump to comment: Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | media_youtube.bug24.diff | 3.53 KB | kobnim |
Comments
Comment #1
Jerimee commentedsame here, using 6.x-1.3
Comment #2
kobnim commentedHere 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