I'm trying to get the login block to show up in the content region when an anonymous user goes to /admin, but there are no blocks rendered in the Rubik theme.
If pinpointed it down to the rubik_blocks_content function who expects a $doit var, but receives none from tao_blocks(). Is this by design? Should this be fixed in Rubik or Tao?

function rubik_blocks_content($doit = FALSE) {
  static $blocks;
  if (!isset($blocks)) {
    $blocks = module_exists('context') && function_exists('context_blocks') ? context_blocks('content') : theme_blocks('content');
  return $doit ? $blocks : '';
function tao_blocks($region) {
  // Allow theme functions some additional control over regions.
  $registry = theme_get_registry();
  if (isset($registry['blocks_'. $region])) {
    return theme('blocks_'. $region); <-- no $doit here!
  return module_exists('context') && function_exists('context_blocks') ? context_blocks($region) : theme_blocks($region);
#13 fubik.zip2.08 KBlil.destro
Members fund testing for the Drupal project. Drupal Association Learn more


delugestudios’s picture

I'm experiencing the same issue. Would love to use Rubik and the Admin module because it looks like some really fantastic work, but this makes it unusable for clients.

kvoltz’s picture

I have the same issue going on.

Also, I can't get this theme to accept a logo image. It shows no logo at all.

BrockBoland’s picture

Priority: Normal » Major

I'm seeing this too, on a couple of my sites. Bumping priority up to major, because the Blocks admin page simply doesn't save the settings when Rubik is set as the admin theme. The admin block page will reflect the changes you make after you save them, but they are not reflected on the public side of the site. It looks like it's not saving the changes in the blocks DB table, but might be in cache_block.

Changing the admin theme away from Rubik solved the problem for me.

I tried enabling the Context module, to see if this function was just failing without it, but that didn't do it. Also tried changing the default value of $doit to TRUE, but that wasn't it either. I'm not sure I understand what all of these theme functions are needed for.

BrockBoland’s picture

Priority: Major » Normal

Actually - I take that back. This might not be a Rubik issue. I just switched to Garland as an admin theme and had the same problem, but I may just have bad data in my DB at this point.

At the very least, on the admin blocks page, the available regions are those defined in Rubik ("Left sidebar", "Right sidebar"), NOT the ones defined for the current theme, a Fusion subtheme that uses "sidebar first" and "sidebar last."

Are you guys using the Admin module too? I thought that might play a part, but disabling it didn't change things.

japanitrat’s picture

Actually it is a Rubik issue. Set the default value of $doit to TRUE and you have blocks in the content region.

Other regions than "content" are not implemented in the page.tpl regardless what you are being told on the blocks page.

picxelplay’s picture

So Rubik is only suppose to have a Content block? And that is only when $doit = TRUE?
Why do the regions left, right,content,header, and footer show on the blocks page if we can't utilize them?

japanitrat’s picture

Rubik is a subtheme of Tao which has declared those regions. Since Rubik does not declare/override its own regions, they are inherited from Tao.

Danny Englander’s picture

Having the same issue, I set some block content to sidebars / right for example for Rubik but they do not show up. For Garland or other they do.

picxelplay’s picture

Thanks. I took a look at look at files of Tao, Rubik and Cube to figure out how to put sidebars on Rubik.

AlfTheCat’s picture

Have the same problem. Set $doit to TRUE in the template.php and now I can place a block in the content area only. But this is still not cool, because whatever I place there shows below the content with now way of changing that. I need a block on top!

japanitrat’s picture

Title: Blocks in Rubik not showing up » Add regions for blocks to page.tpl.php
Category: bug » task
miraga715’s picture

As far as I can understand the rubik was meant to be for admin use and cube as frontend theme. These, though, needs work in order for them to be used as the other themes are used. I would actually consider the Tao themes as developer's themes due to their need for coding to customize. In my experience in order to use the regions you'd have to utilize the context module's 'context layouts' and define the context settings accordingly. The only problem I noticed is that the layout template files must be the main theme folder of your theme.

lil.destro’s picture

2.08 KB

We are using Rubik as a front end theme for an intranet site that is being developed and wanted left and right sidebar. Rubik does not output the region variables in it's page template nor is there any css to support the regions. The easiest way to get them would be to sub-theme Rubik. I have attached the sub-theme that we are currently using which will add left and right regions. It consists of an .info file, css and page.tpl. If there is enough interest I can start a project page so it can be properly maintained to reflect any changes in future releases of Rubik.

Danny Englander’s picture

@lil.destro, Fubik is nice, just installed it as my admin theme, thanks.

Danny Englander’s picture

I think it would be a great idea to make Fubik a project on d.o. There was even a nice response to it on Twitter when I recommended it someone. http://twitter.com/christophercato/status/15519615052423168

yhahn’s picture

No objections here, definitely create a new project if you and others are interested! I also think 'Fubik' is a great name : )

espirates’s picture

I was thinking about re-doing my own version of Rubik. A theme that can't be modified to meet our needs (like most drupal themes are) is useless. Rubik is the most frustrating theme I've come across. Even though it's base theme is tao we can't even make changes to tao and have them reflected in rubic, some crazy code. Fubik is a step in the right direction and should be made into it's own project.

AlfTheCat’s picture

also in favor of a separate project for Fubik :) Great idea. And perhaps instead of using Tao, wouldn't a base theme like Zen be more practical?

el_reverend’s picture

I have edited FUBIK to create new regions. In this case I've edited the page.tpl.php file to include a new region and then declared it in the .info file. However by doing so, FUBIK will now only have one region available (the newly created one). In order to remedy this I copied the regions from Tao (which are inherited by Rubik) into my .info file. So far I do not have any problems since the regions names are identical.

meecect’s picture


wow, fubik is very nice. Exactly what I was looking for. Please make this a project on d.o. If you don't want to do the maintaining, will you let someone else upload it for you (I'll volunteer). It's really very nice.

lnunesbr’s picture


mstef’s picture

@lil.destro: Enabled your theme.. I get the following on every page now:

Error message
Notice: Undefined variable: head in include() (line 4 of /var/www/sites/all/themes/fubik/templates/page.tpl.php).
Notice: Undefined variable: styles in include() (line 5 of /var/www/sites/all/themes/fubik/templates/page.tpl.php).
Notice: Undefined variable: scripts in include() (line 6 of /var/www/sites/all/themes/fubik/templates/page.tpl.php).
Notice: Undefined variable: head_title in include() (line 7 of /var/www/sites/all/themes/fubik/templates/page.tpl.php).
Notice: Undefined variable: attr in include() (line 9 of /var/www/sites/all/themes/fubik/templates/page.tpl.php).
Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, null given, called in /var/www/sites/all/themes/fubik/templates/page.tpl.php on line 9 and defined in drupal_attributes() (line 2258 of /var/www/includes/common.inc).
The website encountered an unexpected error. Please try again later.


Am I missing something?

Edit: Yes..I'm missing the fact that I'm using D7

zilverdistel’s picture


dddave’s picture

Priority: Normal » Major

All the Fubik noise aside:

Blocks would be nice, for example to place a language switcher block or a calendar...

I am bumping priority because:
1. Blocks are pretty commonly used on admin pages.
2. The block admin suggests that blocks are available and saved. This is misleading to say the least.

aiquandol’s picture

As a side note, I wanted to add blocks to my node/add, node/edit, block/edit pages underneath the right side buttons. You can't just create a new region because those pages are controlled via form-default.tpl.php.

The solution is to pass the $right variable to the form-default.tpl.php.

in template.php

function rubik_preprocess_form_buttons(&$vars) {
  $vars['right'] = theme('blocks', 'right');

now in form-default.tpl.php you can print the right sidebar like this

<div class='buttons'><?php print drupal_render($buttons); ?></div>
    <?php print drupal_render($sidebar); ?>
    <?php print $right; ?>

Now any blocks you assign to the right sidebar will appear in those locations.

Hope this is helpful!

dgastudio’s picture

and with d7 version? how to insert custom region?

Gabriel R.’s picture

Just to clear things up a bit:

1. There _are_ regions defined for the Rubik theme: Header, Left sidebar, Right sidebar, Content and Footer. These are likely inherited from Tao
2. The user can set up blocks for them, and everything seems to work.
3. The regions are _never outputted_ in page.tpl by the Rubik theme, at all.

Can someone confirm that this is the case, before I spend another 3 hours trying to "debug" this?


aramboyajyan’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

All old and outdated 6.x issues are being closed.
Maintainer support will be provided only for major / blocking issues.

If you feel like this issue should be re-opened, feel free to do so.