Block shows when image field has no images

rgammon - March 18, 2009 - 17:44
Project:jcarousel block
Version:6.x-1.6
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Block shows when imagefield has no images in it. Currently I am using the "show on all pages except" display permission set in the block administration section-- but this doesn't help with new content added by non-admin users.

Is there a pending fix, or a php snippet I could put in the block admin settings?

My issue seems identical to this one: http://drupal.org/node/314168?mode=2&sort=2

#1

rgammon - March 19, 2009 - 02:44

Temporary fix: Add the following to jcarousel_block/includes/imagefield.inc (insert line 27):

/**
   * Kluge added to keep from showing when no image in field
   * @todo switch "field_image", a specific CCK name for my installation, to variable naming the image_field that goes in this block
   */
  else if ($node->field_image[0]['filepath'] == null) {
    return false;
  }

#2

doomed - March 23, 2009 - 19:15

I'm having the same problem on v1.6 .

This wasnt happening before.

But yesterday i upgraded my Drupal installation from 6.9 to 6.10 and then upgraded CCK and a few other modules and since then, i'm having this problem.

#3

doomed - March 23, 2009 - 19:47
Category:support request» bug report

I just updated to the last version (6.x-1.x-dev from March 20th, 2009) and the same thing still happens.

So i applied rgammon's mini-fix and all is well.

I dont like that we have to hardcode the fieldname but at least it works.

Thanks rgammon.

I hope yang_yi_cn looks at this soon :)

#4

yang_yi_cn - March 23, 2009 - 23:25
Status:active» fixed

http://drupal.org/cvs?commit=187560

committed

#5

Heilong - March 24, 2009 - 09:51

Hi,
I have the same problem, I applied the fix but it didn't work as expected.
I have applied on a cck imagefield source of 4 images, when I upload for example just 2 of 4 images using imagefield, in the carousel view I have the 2 images and 2 question marks "?" under safari, because I uploaded only 2 images, and under firefox I have 2 blank squares.
Moreover the thumbnails in the carousel are not fitting in it...
Any ideas ?
Thanks,

#6

doomed - March 24, 2009 - 20:19

Which fix have you applied?

rgammon or the new dev version from yang?

As for the thumbnails problem, check the Documentation on this site.

#7

Heilong - March 26, 2009 - 10:25

I just applied the new dev version by yang, but it didn't change anything, for the thumbnails fitting problem it's a CSS conflict I guess.

#8

Heilong - March 26, 2009 - 10:46
Status:fixed» needs work

Just to change the topic status, I tried to fix it but it still didn't...

#9

doomed - March 26, 2009 - 22:43

I didnt apply the new version yet, will report later.

About the thumbnails, yes its a CSS thing: http://drupal.org/node/405650

 
 

Drupal is a registered trademark of Dries Buytaert.