System:
Drupal 5.7
PHP 5.1.x
MySQL 5.x
Problem: Creates "See Video" link when video field is empty.
To reproduce: Set thumbnail to create a thumbnail in teaser view and you get a link "See Video" The thumbnail is correctly created and the "See Video" links to the correct node/address. Changing the teaser setting back to full video or default fixes the problem. You can see the bug on http://test.tbsk.no/ (node 623 and 624).
It is introduced in 5.x-1.2. Have not been able to reproduce this on 5.x.1.0.
Cheers
Stein Magne
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | video_cck_see_video.patch | 684 bytes | laken |
| #13 | video_cck_see_video.patch | 514 bytes | k8n |
Comments
Comment #1
steinmb commentedBump!
Comment #2
josoal commentedI have the same problem...
If I set cck embedded video to multiple values and no video is atached, I see 3 ""See Video"".
(sorry for my english)
Comment #3
steinmb commentedLooks like problem is in /contrib/video_cck/video_cck.module. They added some code that make the "See Video" link i it fails to create a thumnail and when the field is empty there is nothing to create a thumbnail from, and it fails and just print "See Video".
Somewhere in the code it is not doing a empty check first.
--
Stein Magne
Comment #4
josoal commentedBump!
Comment #5
leoklein commentedYup. Same problem here. Just started when I upgraded to 5.x-1.2.
Comment #6
leoklein commentedTotal hack but you get rid of the 'See Video' if you do something like this:
Comment #7
Richard_ commentedThank you for the hack. Hopefully this will be solved in next version :)
Comment #8
lindsayo commentedWhew. That felt good. Gotta love finding an answer in the forums so easily. Thank you!!
Comment #9
steinmb commentedMonths has past without any of the maintainers have released any official fix for this bug. I have just tested the last dev. version of 5.x.
aaron or Alex UA pls. respond if you find the time. Thanx for all your work on this awesome module!
Cheers
Steinmb
Comment #10
steinmb commentedShould prob. be moved to Video CCK
Comment #11
pereljon commentedHere's some smart code to check for the "see video" links to empty embedded media fields. Stole the "if ($item['value'] && $item['provider'])" code from just above where this edit goes...
Comment #12
aaron commentedvideo cck has long been deprecated. moving back to emfield
Comment #13
k8n commentedTo accelerate the process, attached is a patch for pereljon's suggested fix created against version 1.2.
I have not investigated deeper yet, but I believe there is a larger issue here with video_cck (or emfield?). There is no reason why fields with empty values should be stored in the database at all. For instance, when video_cck field is set to allow multiple values on a node, once the node is saved, 4 empty fields are committed to the database. If we were to contrast this behavior against imagefield's, we'd probably notice that imagefield removes empty fields from the database all together. Wouldn't this be the desired behavior for video_cck (emfield?) as well?
Comment #14
joetsuihk commentedthe problem also finds in v1.3
agree with #13
but as we still do have have a patch that complete the idea,
maybe we can test the patch and commit it as a work around currently.
i think this issue should be solved before next 5.x version release..
Comment #15
matiki commentedAdded the patch and made the two statements above them look like this = works!
just add "$item['value'] && $item['provider']" to the if-statement and make the else to else if and add the same thing there.
Comment #16
lindsayo commented-
Comment #17
laken commentedThe patch in #13 no longer applies against 5.x-1.3. I've re-rolled it to work with the current release. New patch is attached.
This patch appears to work fine, without the additions in #15 above.
Can the maintainers commit this to the 5.x branch? Or could we at least get a review?
Comment #18
alex ua commentedThis approach sees fine to me, though it no longer applies to Drupal 6. I'm going to try and go through and commit the 5.x patches we have soon.
Comment #19
alex ua commentedChanging Status.
Comment #20
aaron commentedcommitted. thanks!