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!

CommentFileSizeAuthor
#19 483294-19.patch1.04 KBmaijs
#20 483294-20.patch1.04 KBmaijs

Comments

vodde83’s picture

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

btopro’s picture

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

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

Eugene Fidelin’s picture

subscribe.

This bug is very annoying

Howi can solve it?

bkoether’s picture

Version: 6.x-1.11 » 6.x-1.15

This issue is still there in the latest version.

virtualdrupal’s picture

Same problem here, not set to null

OnlineWD™’s picture

Seems related to http://drupal.org/node/434024 ..

t.lan’s picture

subscribing - same with me.

mason@thecodingdesigner.com’s picture

subscribing. have the same issue on a couple sites

jrefano’s picture

same bug here

naero’s picture

Subscribe!

naero’s picture

Try 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

jrefano’s picture

nearo: #1 / #11 work fine for me, but thats not really a solution as far as an end-user is concerned.

alison’s picture

subscribing

mikejonesok’s picture

Sub...I am getting the site errors on my site. If I remove a url and save it still keeps the drupal play button thumbnail.

plasticlax’s picture

using latest d5 and saving twice does not solve this issue for me.

Anonymous’s picture

Version: 6.x-1.15 » 6.x-1.18

Subscribing. Bug still in 6.x-1.18

maijs’s picture

Subscribing.

mikejonesok’s picture

Priority: Normal » Critical

No fix yet? I wonder what it can be?

maijs’s picture

Status: Needs review » Active
StatusFileSize
new1.04 KB

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

maijs’s picture

StatusFileSize
new1.04 KB

Disregard #19, code typo was introduced.

Check out #20.

mikejonesok’s picture

mikejonesok’s picture

Status: Active » Fixed

Tested patch. WORKING! maijs you are great! Thanks!

aaron’s picture

Status: Fixed » Needs review

not fixed until it's committed...

aaron’s picture

and thanks for the patch, @maijs, i'll look at that during my next batch (probably wednesday)!

j0e’s picture

Version: 6.x-1.18 » 6.x-1.19
Status: Active » Needs review

Did 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

maijs’s picture

It's too bad this simple patch was not commited in 1.20. Have to repatch local files after update again.

aaron’s picture

Status: Needs review » Fixed

thanks @maijs, modified to work against all emfield contrib modules and committed.

Status: Fixed » Closed (fixed)

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

thrash632’s picture

um, 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...

thrash632’s picture

Also, 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 :-/