| Project: | Views Tagadelic |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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 == '').
Comments
#1
I'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.
#2
Incidentally, I "solved" my problem by using "views cloud" module.
#3
Same problem.
#4
Same problem.
#5
Same problem. I can see it in the view preview, but it does not show up in a block.
#6
Same 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
#7
Same exact problem here. Sigh. Looks great in the preview.
#8
Same 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,
));
#9
#10
Selected 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.
#11
Looks 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.
#12
Mike's fix worked for me also. I've tested it on several different views and created a few blocks. Thanks Mike.
#13
Thanks... It worked fine for me also. I think it should be committed...
Sinan
#14
#15
Just 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!
#16
subscribe
#17
Thanks 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.
#18
Hi,
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
#19
Attached is the patch. It has been commited to the branch.
Agree that this makes the first stable release?
#20
@indytechcook:
From my side there are no objections; with the fix from #11 the module works as advertised.
Greetings, -asb
#21
I lost track of this issue and commited a fix form #366659: Empty block should not have results.
#22
Automatically closed -- issue fixed for 2 weeks with no activity.