Block shows up on blocks page, but no content in sidebar

cwells - February 24, 2009 - 23:00
Project:Views Tagadelic
Version:6.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

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 == '').

#1

FiNeX - March 7, 2009 - 11:01

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

cwells - March 7, 2009 - 23:07

Incidentally, I "solved" my problem by using "views cloud" module.

#3

webel - March 9, 2009 - 03:04

Same problem.

#4

honucreative - March 13, 2009 - 12:52

Same problem.

#5

satcom74 - April 12, 2009 - 02:21

Same problem. I can see it in the view preview, but it does not show up in a block.

#6

rshojo - April 18, 2009 - 09:57

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

Zach Harkey - April 28, 2009 - 03:26

Same exact problem here. Sigh. Looks great in the preview.

#8

mikel1 - May 10, 2009 - 13:25

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

mikel1 - May 11, 2009 - 03:20
Category:support request» bug report

#10

mikel1 - May 11, 2009 - 03:39

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

mikel1 - May 11, 2009 - 23:34

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

satcom74 - May 12, 2009 - 03:58

Mike's fix worked for me also. I've tested it on several different views and created a few blocks. Thanks Mike.

#13

etcetera9 - June 12, 2009 - 10:48

Thanks... It worked fine for me also. I think it should be committed...

Sinan

#14

cwells - June 12, 2009 - 13:13
Status:active» reviewed & tested by the community

#15

seehawk - June 27, 2009 - 02:22

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

HnLn - July 3, 2009 - 12:35

subscribe

#17

travisaugust - July 17, 2009 - 19:16

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

asb - October 5, 2009 - 07:50

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

indytechcook - October 5, 2009 - 13:07

Attached is the patch. It has been commited to the branch.

Agree that this makes the first stable release?

AttachmentSize
tagadelic_views-382858.patch 903 bytes

#20

asb - October 5, 2009 - 21:59

@indytechcook:

From my side there are no objections; with the fix from #11 the module works as advertised.

Greetings, -asb

 
 

Drupal is a registered trademark of Dries Buytaert.