Hello, when I remove an embedded video from a node (by clearing the embedded video field and saving the node), the data in the field seems like it's not completely cleared out. When I go back to edit the node, the ID part of the field shows the old URL for the video. Likewise, in Views, the "is empty" test for the field fails.
Is there another way I should be removing/deleting videos? Or does the code need to more thoroughly delete any data associated with the embedded video when the field is cleared out?
Steps to reproduce:
1. Add embedded video field to a content type.
2. Create a new node of that content type.
3. Paste the URL of a YouTube video into the embedded video field.
4. Save the node.
5. Edit the node.
6. Delete the YouTube URL from the embedded video field.
7. Save the node.
8. Edit the node -- the YouTube URL shows up in the ID portion of the embedded video field.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 483294-19.patch | 1.04 KB | maijs |
| #20 | 483294-20.patch | 1.04 KB | maijs |
Comments
Comment #1
vodde83 commentedI seem to have this problem as well.
If I clear the field, and save the node, the ID still remains, but the field is now empty.
If I save again, then it is removed from the node entirely, so I need to save twice, to remove a video.
Comment #2
btopro commentedI've found the issue at a database level at least.... When you clear a field that previously had a video in it it doesn't set the fields to null, it just kind of bumps them around. Infact the path to the video gets moved over one into the location field for some reason (very odd). As such, querys done via Views still show the video bc it hasn't been fully cleared. This is still the case in the newest version so bumping version
Comment #3
Eugene Fidelin commentedsubscribe.
This bug is very annoying
Howi can solve it?
Comment #4
bkoether commentedThis issue is still there in the latest version.
Comment #5
virtualdrupal commentedSame problem here, not set to null
Comment #6
OnlineWD™ commentedSeems related to http://drupal.org/node/434024 ..
Comment #7
t.lan commentedsubscribing - same with me.
Comment #8
mason@thecodingdesigner.com commentedsubscribing. have the same issue on a couple sites
Comment #9
jrefano commentedsame bug here
Comment #10
naero commentedSubscribe!
Comment #11
naero commentedTry this:
1) Go to the "edit" for the node you want to remove the embedded media field content (ie. YouTube)
2) Remove the URL from this specific field, and hit 'Delete' for any thumbnail that may have been created
3) Submit the changes.
4) Click on "edit" again, and re-submit.
5) Should be gone.
This is a temporary workaround, but I wonder if it works for all of you?
Edit: Basically, what was said in comment #1
Comment #12
jrefano commentednearo: #1 / #11 work fine for me, but thats not really a solution as far as an end-user is concerned.
Comment #13
alisonsubscribing
Comment #14
mikejonesok commentedSub...I am getting the site errors on my site. If I remove a url and save it still keeps the drupal play button thumbnail.
Comment #15
plasticlax commentedusing latest d5 and saving twice does not solve this issue for me.
Comment #16
Anonymous (not verified) commentedSubscribing. Bug still in 6.x-1.18
Comment #17
maijs commentedSubscribing.
Comment #18
mikejonesok commentedNo fix yet? I wonder what it can be?
Comment #19
maijs commentedPlease check this patch. I added a condition that checks whether field is empty. If it is, field data is not saved to the database (empty values are set, that is) and thumbnail files are removed if emthumb module is enabled.
Patched against 6.x-1.18.
Comment #20
maijs commentedDisregard #19, code typo was introduced.
Check out #20.
Comment #21
mikejonesok commentedComment #22
mikejonesok commentedTested patch. WORKING! maijs you are great! Thanks!
Comment #23
aaron commentednot fixed until it's committed...
Comment #24
aaron commentedand thanks for the patch, @maijs, i'll look at that during my next batch (probably wednesday)!
Comment #25
j0e commentedDid this patch ever get committed? If so, what version should I be using.
I'm using 6.x-1.19 and have same problem with the id as mentioned at top of post: the video link stays below the empty field, even after I delete the youtube url from the field and save the node edit form.
Thanks,
Joseph
Comment #26
maijs commentedIt's too bad this simple patch was not commited in 1.20. Have to repatch local files after update again.
Comment #27
aaron commentedthanks @maijs, modified to work against all emfield contrib modules and committed.
Comment #29
thrash632 commentedum, was this ever fixed? Im using the latest version of embed field on Drupal 6 and still have this problem. Take a look:
http://www.adambadlotto.com/work/print/organic-consumers-association-des...
Comment #30
thrash632 commentedAlso, the temporary fix by deleting, saving, and then saving again doesn't work for me. The only work around for me is to delete the entire node and recreate it from scratch :-/