Download & Extend

Deleting embedded video doesn't fully clear field

Project:Embedded Media Field
Version:6.x-1.19
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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!

Comments

#1

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.

#2

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

#3

subscribe.

This bug is very annoying

Howi can solve it?

#4

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

This issue is still there in the latest version.

#5

Same problem here, not set to null

#6

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

#7

subscribing - same with me.

#8

subscribing. have the same issue on a couple sites

#9

same bug here

#10

Subscribe!

#11

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

#12

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

#13

subscribing

#14

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.

#15

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

#16

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

Subscribing. Bug still in 6.x-1.18

#17

Subscribing.

#18

Priority:normal» critical

No fix yet? I wonder what it can be?

#19

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.

AttachmentSize
483294-19.patch 1.04 KB

#20

Disregard #19, code typo was introduced.

Check out #20.

AttachmentSize
483294-20.patch 1.04 KB

#21

#22

Status:active» fixed

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

#23

Status:fixed» needs review

not fixed until it's committed...

#24

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

#25

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

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

#26

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

#27

Status:needs review» fixed

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

#28

Status:fixed» closed (fixed)

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

#29

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

#30

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

nobody click here