Needs work
Project:
CCK Blocks
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2008 at 04:00 UTC
Updated:
9 Oct 2011 at 02:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
no2e commentedNo idea?
Comment #2
no2e commentedI tried to limit the visibility only to the nodes where I used the ckk fields -> the CCK:Blocks show the title at any time
I tried to set the visibilty to everywhere -> the CCK:Blocks show the title at any time
But: there is one cck field, that only get's displayed, when there is data filled in. But it has the very same settings as the other fields too. And oddly enough the title appears sometimes, when there is no content, but disappears later again. I tried to clear cache but I can't see any regularity.
Comment #3
no2e commentedbump, still got this problem.
Comment #4
no2e commentedComment #5
Anonymous (not verified) commentedDo you still have this problem? I'm using CCK blocks with empty fields in some nodes and the block is not displayed there.
Comment #6
no2e commentedCan't tell at the moment, because I stopped using this module because of the issue CCK Block shows everything in one line
Comment #7
Anonymous (not verified) commentedThat issue will be fixed in the next -dev release. I close this issue. Please re-open it or create a new one, if you have the problem again. Please provide information about the field type, you have this problem with. This is important, as we do only display the content, that is provided by the corresponding module. We ask the module, providing your field, to format its content and display it in the block.
If the module gives us more than an empty string, even if the field is empty, the block is visible (or at least it's title).
Comment #8
joelstein commentedI experience the same behavior when using ImageField. If there is no file/image uploaded into the CCK field, I expect that the block would not appear at all. However, it does, with no content.
Comment #9
joelstein commentedMy mistake! In my case, the FileField could not find the image on my system, so the view was actually rendered as an HTML comment:
Now that I have that resolved, the block does not appear.
Comment #10
organicwire commentedI also encountered this problem.
- I have a node type called news with a non-mandatory cck text field called key facts. For this field I created a block.
- I create a news node while leaving the field key facts empty.
- When viewing the node, I expect the key facts block to disappear (as there's no data to display). But instead the block is still shown, with its title and no content.
I use cck blocks 6.x-1.3. The attached fix resolved the problem.
Comment #11
Anonymous (not verified) commentedAre you using a wysiwyg editor? I'll add the patch to the next -dev. Please check, if it still works as expected.
Comment #12
nicholasthompsonI just tested this patch against 1.3 and it worked perfectly.
Attached is a "revised" patch which was done using diff, rather than "git diff". It also tidies up a few stray empty spaces; no functional changes.
I think this is RTBC.
Comment #13
colorado commentedI just tested this, and found that it works correctly if I have only one block on a content type.
However, if I have two then they both appear even if only one of the blocks contains content.
I set this issue back to "needs work" - I hope that was appropriate.
Thank you so much for this sooo coool module!
Comment #14
nicholasthompson@Colorado - when you say "two blocks", do you mean two different fields exposed as blocks? What field type are they?
Comment #15
Bill Choy commentedI had a similar problem, where the CCK_block was the only thing in my right-sidebar. But the right-sidebar did not collapse when the CCK_Block should have been empty.
THANKS FOR THE PATCH. But the test in the patch didn't work for me
+ $block_content = drupal_render($cck_field_data);
+ if (trim($block_content) != '') {
because the $block_content contains a bunch of 'span id="thmr_42" class="thmr_call" ' that get inserted by Devel module.
Had to use a really ugly test, by checking the values in cck_field_data of the first CCK_block fields, with a
+ if (trim($cck_field_data['field']['items'][0]['#item']['value']) != '') {
Comment #16
doublejosh commentedSame issue here.
I'm using Context to place the block, in case that's a piece of it.
Comment #17
doublejosh commentedLittle more weirdness...
When the field was added to the content type after the time it was last saved (and the field value is NULL) CCK doesn't seem to know what to do and DOES NOT show the block. Saving it causes the block to show when it still should not.
I'm using this on a on/off checkbox to show a badge. Node saved with checkbox unset do not show the CCK block, nodes with checked show the CCK block, old nodes never saved after it was created still show the block though the value is unknown. Perhaps their's an issue with on/off value still being a value?