I have a jcarousel block view that shows image fields of a current node. The problem is that the view always returns a row, even if the node in question doesn't have any image fields. As a result the view is shown on a node page and there is an empty image.

I attached an image where the html created by the view can be seen. The li element is there but it is empty. The same behavior occurs with other themes so it shouldn't be a theme related issue.

Comments

knalstaaf’s picture

Same here, D7.14.

It remains an issue I guess, but there is an easy workaround:

  • Go its Views settings.
  • Add a relationship. Search for "fid" in the list and check the field your jCarousel is using.
  • Add an extra filter criterion. Search for "fid" and once again: check the same field.
    • Using these settings for this field: Operator: is not empty (NOT NULL)
  • Save, should get you going.
knalstaaf’s picture

Status: Active » Needs work
krishanchandra’s picture

Thanks this work for me.

simone960’s picture

Great Thanks @knalstaaf ! It works perfectly.

rickdonohoe’s picture

StatusFileSize
new625 bytes

This patch checks if the first row is empty, and if so doesn't output the jCarousel ul and anything within it.

rickdonohoe’s picture

Status: Needs work » Needs review
StatusFileSize
new625 bytes

This patch checks to see if the first row is empty, and doesn't output the

    and it's child elements if it is.