I have created a view of all the nodes I want, and when I hit the ole' "Preview" (either for "defaults" or for "block") I get a lovely-looking themed, tagadelic block -- exactly what I want (so I know I've created the view correctly).
So I go over to admin/build/block and put the "entities_tagadelic: Block" block into my right sidebar, and I see nothing.
If I print_r($vars['output']) in template_preprocess_views_view_tagadelic I get the right thing (a nice themed tagadelic block). Then if I go over to tagadelic_views/theme/views-view-tagadelic.tpl.php and write "hi!" in there, I don't see "hi!" appear anywhere.
Does that .tpl.php need to go in my theme directory? The README and installation instructions didn't seem to indicate that, but when I moved it over there I at least got the block title to show up, but the content were empty ($output == '').
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | tagadelic_views-382858.patch | 903 bytes | indytechcook |
Comments
Comment #1
finex commentedI've got the same problem: I've correctly created the view (the preview shows up the tag cloud). When I add the block to any region, it is not displayed.
Comment #2
chrisfromredfinIncidentally, I "solved" my problem by using "views cloud" module.
Comment #3
webel commentedSame problem.
Comment #4
krisrobinson commentedSame problem.
Comment #5
satcom74 commentedSame problem. I can see it in the view preview, but it does not show up in a block.
Comment #6
rshojo commentedSame problem I think multiple vocabularies, wanting a tag cloud based on the vocabularies.
got views tagadelic module installed.
view sets up, shows results, enabled block but no block showing
Comment #7
zach harkey commentedSame exact problem here. Sigh. Looks great in the preview.
Comment #8
mikel1 commentedSame problem here. Some additional info:
Added a page view, works fine. Block views do not show up.
installed dev module and looked at page queries. Looks like views_tagadelic block query *is* being run, but nothing displays on the page.
FYI here is my view
$view = new view;
$view->name = 'tag_cloud';
$view->description = 'Tag Cloud';
$view->tag = 'Tag Cloud';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'tid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'type' => 'separator',
'separator' => ', ',
'empty' => '',
'link_to_taxonomy' => 1,
'limit' => 0,
'vids' => array(
'1' => 0,
'2' => 0,
),
'exclude' => 0,
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'blog' => 'blog',
'recipe' => 'recipe',
'podcast' => 'podcast',
'simplenews' => 'simplenews',
'story' => 'story',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('header', 'Test');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 1);
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'tagadelic_views');
$handler->override_option('style_options', array(
'steps' => '6',
'size' => '500',
'vocab' => '',
));
$handler = $view->new_display('block', 'Tag Cloud', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'tagtest');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
Comment #9
mikel1 commentedComment #10
mikel1 commentedSelected vocab, which was missing, but even so, nothing shows up. Narrowed down code to theme.inc, around line 51:
if (empty($vars['output'])) {
$view->result= NULL;
}
If this code is commented out, block displays on both preview page and pages where block is supposed to be. Will do more digging another day - getting late here.
Comment #11
mikel1 commentedLooks from the way the code works like the intention of
if (empty($vars['output'])) {
was really
if (!empty($vars['output'])) {
The reason I think that is because at this point in the code $vars['output]' *is* empty unless there has been an error in the query, in which case it contains an error message.
I made the change in my code and all works as expected. Hope this helps.
Comment #12
satcom74 commentedMike's fix worked for me also. I've tested it on several different views and created a few blocks. Thanks Mike.
Comment #13
Sinan Erdem commentedThanks... It worked fine for me also. I think it should be committed...
Sinan
Comment #14
chrisfromredfinComment #15
seehawk commentedJust for reference, this also fixed a problem I was having with a views page not displaying when inside a page built with the Panels module.
Thanks for the fix!
Comment #16
hnln commentedsubscribe
Comment #17
travisaugust commentedThanks for the fix. I've spend most of the day trying to figure this out on a D5->D6 upgraded site and just found this thread.
Comment #18
asb commentedHi,
same problem, and confirming that the fix from #11 works flawlessly.
Could we roll a proper patch and please get this into the next release?
Thanks & greetings,
-asb
Comment #19
indytechcook commentedAttached is the patch. It has been commited to the branch.
Agree that this makes the first stable release?
Comment #20
asb commented@indytechcook:
From my side there are no objections; with the fix from #11 the module works as advertised.
Greetings, -asb
Comment #21
indytechcook commentedI lost track of this issue and commited a fix form #366659: Empty block should not have results.