I have the latest version of emfield installed (6.124) along with the latest version of ImageCache (6.20 beta 10). I am experiencing an issue where when displaying an imagecache created image linked to display a video in shadowbox. If I enter a URL for the video, everything works perfectly. If I leave the video field blank, then drupal displays a broken image that links to nothing.
Here's what I did:
I create an Emfield Video field type with CCK. I then create a Node using that field. I didn't enter anything into the Video field, and here is what happened:
http://www.adambadlotto.com/work/branding/admitme2com-identity
Notice the broken image? It's also overlaying the emfield overlay play button.
Now here is an example where I entered a value for the Video field:
http://www.adambadlotto.com/work/film/only-dreams-short-film-installation
See? No problems at all.
I don't think this is an Emfield issue because when I change the 'Display' settings for the field to 'Default', the video field isn't generated at all when empty. It's only when I use an image to display it.
I am not using contemplate, this is just how the node displays on its own.
I am using Youtube as the provider in the examples.
I found this thread which discussed an issue between imagecache and emfield:
http://drupal.org/node/692956
I added the php code to my templates.php file and it got rid of the broken thumbnal, but the emfield overlay play button and the field label remained (I've removed the code since then so everyone can see what's happening exactly).
I can't imagine nobody else is experiencing this issue. I don't know any programming other than html and css, so I was hoping someone more experienced could look at the code and see what's going on? I will do all I can to help test things to get this resolved.
Thanks.
Comments
Comment #1
thrash632 commentedComment #2
thrash632 commentedComment #3
vthirteen commentedexactly the same here
subscribe
Comment #4
porg commentedI created a custom content type "Video" which has both a Video field and a 3rd Party Video field, so that I can use an internal OR external video.
But if I create a new "Video" node with an internal but no external video field, I realized that the external video field is nevertheless rendered into HTML, which makes no sense in terms of data structure and SEO (empty container), and in some cases it can also disturb the style/layout and therefore user experience/interface. In my case the "orphaned Lightbox play button" is positioned so unhappily, that it overlays other unrelated elements of the page.
I don't think that this is an ImageCache bug, but rather concerns the more general modules related to CCK fields, in order of assumed probability for responsibility:
1) CCK as it generally handles fields
2) FileField as it particularly allows file fields (hence internal video files)
3) Embedded Media Field as it particularly provides 3rd party media fields
Comment #5
steinmb commentedSubscribing. I seem to remember that CCK do not know if a field is empty or not and if the field label is passed on it will get passed on the the drupal render system, so I think it is the field widget that have to check this and remove the label if this is expected behaviour.
Comment #6
porg commented@steinmb: To prevent misunderstandings, I state the information even clearer: It's not only the field label, which is rendered against my will, but the whole empty field is rendered as the according nested HTML elements! See this excerpt:
Remark: In my opinion, if the field "YOURNAME" is empty, not only the DIV "field-label" should be omitted, but the whole DIV "field-field-YOURNAME" with all its child elements shall be omitted.
Meanwhile I assume that this bug is Emfield's fault, as other modules such as Video field do not pass on empty fields for rendering! See my comment within the Emfield issue tracker.
Comment #7
patterndev commentedI solved this by defining a default thumbnail image in the embedded video field setting. I made the image a 1 pixel image with a white background so it blends into the background. You can change the color to whatever your background is. It is not a perfect solution since the user can still click on the image if they find it but it is better than the 'X' that IE shows.
Comment #8
fizk commentedPlease reopen if this is still an issue with ImageCache 6.x-2.0-rc1.