I've created a tabbed block width 2 block created with the views module but the block only return this:
* Error! click here!
Please config the tab title here.

I thing it's related to:
http://drupal.org/node/165721

and it's not fixed.

CommentFileSizeAuthor
#19 Telefont.png112.52 KBBedestenlioglu
#10 a.jpg22.44 KBjoetsuihk
#4 variables.sql_.txt94.25 KBxpete

Comments

joetsuihk’s picture

Assigned: Unassigned » joetsuihk

from the information you provided, I will considered as "by design"
you may click the "Error, click here" and from the tab, you can link to a page that will enable you to enter the title for the block.
after entering the title, the error disappeared.

if i miss understand this issue, please correct.
I will left this issue as bug now, for easy to notice this issue.

xpete’s picture

I've already tried that before creating the bug report.

joetsuihk’s picture

I cannot re-generate the error, can you post the steps that the error will always happen?

xpete’s picture

StatusFileSize
new94.25 KB

Create a new tabbed block
add 2 block crated by the views module.
change the options to show the tabbed block.

What else do you want?
Note:
If I change your module to ignore the title he says that the content is empty.

xpete’s picture

I'm using the project and janode modules to create the nodes that are used by the views module to create the blocks.

hansrossel’s picture

Same problem here.

I'm displaying the event calendar and a view with Latest events in a tabbed block. Changing the title of the view block by clicking the "Please config the tab title here" does not solve the problem.

hansrossel’s picture

Using the same workaround as in http://drupal.org/node/165721 solved the problem.

I just made a new block and put the following php code in it and gave the block a title. The LatestEvents view now displays correctly.

<?php
$module = 'views';
$delta = 'LatestEvents';
$block = module_invoke($module, 'block', 'view', $delta);
print $block['content'];
?>
xpete’s picture

It also works for me.
joetsuihk, can you create a patch?
I don't want to create extra blocks.

joetsuihk’s picture

sorry all, i am watching the issue, but my schedule is so full, sorry about that
i am working on it.

joetsuihk’s picture

StatusFileSize
new22.44 KB

i am using the "recent comments" block that comes with views installation for testing this,
but cannot regenerate this bug.(views1.6, D5.5)
i think it is because you misunderstand the helping text:"Please config the tab title here"

after you click the link, you are redirected to another page, the block setting page.
fill the block title there, in that page, and save,
you can have the fine title.
this at least works in my fresh installation.

i attached the helping image for more clear instruction.
please report if this works, if so, i change the helping text to better one.
if not, please specify details..

sorry for holding this issue so long.

xpete’s picture

I've already did what you that.
Try to create your own block view.
The only way i can work around this is using the hansrossel method.

xpete’s picture

It works if i have a view with a page and a block and the page is already loaded, if the page aren't loaded the block didn't work.

xpete’s picture

>It works if i have a view with a page and a block and the page is already loaded, if the page aren't loaded the block didn't work.
I was wrong, this works sometimes but not as i think.
i've tried to reproduce the problem in a testing enviroment but i can't and don't know why.
the only way that i can get it working in my production site is using the hansrossel method.

joetsuihk’s picture

thx.

i think there are some conflict between modules or with some build in functions.

hansrossel method hardcoded line 108, and function tabbed_block_output_content_block()

can you test line 293 ?

db_fetch_array(db_query("SELECT title FROM {blocks} WHERE module = '".$conf['module']."' AND delta ='".$conf['delta']."'" ) )
xpete’s picture

How can i test this?
I've tried
SELECT title FROM blocks WHERE module = 'views' AND delta ='ultimos_projectos' and it returns the bock i need.
Iv'e also tried other things but can't get any useful information.

xpete’s picture

I don't think it's related to line 293 because sometimes it works.
should be something called before.

tewe’s picture

i've the same problem too.
the block is created by views and cached!
It has title, and if i click on the refresh button, the tab title come up. But after a page refresh the "error! click here!" text is reappear.

joetsuihk’s picture

there is a variable named tabbed_block_settingsX, where X is the tabbed Block index
the value of the variable will shows the views name if views block are used.(example "views-sth")
please check if this is correct when happens in views.
because i still cannot reproduce the issue.
i had a production-ready site, and installed it, nth happen.....

to actually roll back the module to its init. state,
delete variable "tabbed_block_settingsX" and "tabbed_block_list"
and re-add blocks.

Bedestenlioglu’s picture

StatusFileSize
new112.52 KB

Hi,

I have two tabbedblocks on my frontpage . One works fine but the other has the problem with block titles and I see nothing but "Error!click here!" message ..

- The first tabbedblock has blocks comes with view module like "Recent comments", "New Forum ",etc.
This woks fine .

- The second one has the blocks created by myself through views module .. This does not work ...

I have attached the screengrab file and marked the first tabbedblocks with red and the other with the green .

I hope this will give you some hint to regenerate the problem..

Bedestenlioglu’s picture

and the second tabbedblock has worked applying the workaround from #7 ..

xpete’s picture

Drupal creates a clone of each block for each theme and you forgot to check if the block loaded is related to the active theme.
Try to install more than one theme in one website and will see the problem.
If I remove the the versions of the blocks that are related to the themes that i didn't use the block started working.
I hope you understand my poor english.

joetsuihk’s picture

thxa lot xpete, plz try this function:

function tabbed_block_output_content_block($conf) {
  global $theme;
  
  $block = (object) module_invoke($conf['module'], 'block', 'view', $conf['delta']);
  
  $block->module = $conf['module'];
  $block->delta = $conf['delta'];
  
  $temp = db_fetch_array(db_query("SELECT title FROM {blocks} WHERE theme = '".$theme."' AND module = '".$conf['module']."' AND delta ='".$conf['delta']."'" ) );
  if ( $temp['title'] ){
    $block->subject = $temp['title'];
  }
  
  if ( !$block->subject ){
    $temp = block_box_get( $conf['delta'] );
    $block->subject = $temp['title'];
  }

  $result = db_query("SELECT pages, visibility FROM {blocks} WHERE theme = '%s' AND module = '%s' AND delta = %d",$theme,$block->module, $block->delta);

  $block = (object)array_merge((array)$block,(array)db_fetch_object($result));
  if ($block->pages) {
    if ($block->visibility < 2) {
      $path = drupal_get_path_alias($_GET['q']);
      $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block->pages, '/')) .')$/';
      $page_match = !($block->visibility xor preg_match($regexp, $path));
    } else {
      $page_match = drupal_eval($block->pages);
    }
  } else {
    $page_match = TRUE;
  }
  if($page_match) {
    $output = $block;
  }
  return $output;
}
xpete’s picture

your code works.
But in my testing enviroment the tabbed block works without problems but on my production enviroment it stop working some hours after i've done the workarround and before you sent that code ant it still not working.
your code works but there's someting else... and very strange.

joetsuihk’s picture

got it
thx
i also hope this issue can be fixed very soon, since something had cleared!

then we can move to new feature implementation

xpete’s picture

I've just noticed that you updated the module with the analytics patch.
I've download that version, added your code and the tabs are working now.
I think you can commit your code.

joetsuihk’s picture

Status: Active » Reviewed & tested by the community

great!

thx you all!

will be committed soon

joetsuihk’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

comitted in dev

xpete’s picture

Status: Fixed » Closed (fixed)