I have a theme set for the FB App Canvas and Tab, different from the default site theme. When viewing the Tab, I see the site theme, not the specified theme, and the view App option which shows the Canvas, shows the correct theme. Any ideas?

Comments

jack_tux’s picture

subscribe...have same issue.

Störtebeker’s picture

Check if you are logged-in on your Drupal site as Admin when visiting your Facebook Tab (logged-in on FB simultaneously). Log-out from your Drupal site and login again in FB and check the Tab again.

Generate Test accounts and visit your Tab pages / Apps with them. I had the same issue w/ the DFF 6 branch. Logged out from my Drupal site is always "better" when visiting my Tabs or app pages.

Even worse (still checking the details) when Drupal Admin is connected w/ your Facebook account. Strange side effects!
...G

Würden’s picture

I have the same issue, the theme i created with a 520px width works when used on the canvas page, but when used on a tab the default site theme is used instead although I told it to use the same theme as the canvas page in tab settings. (The tab is using an iFrame, not FBML)

Würden’s picture

Status: Active » Needs review

I found a fix, add this code at the bottom of your fb_tab.module

function fb_tab_custom_theme() {
  if (fb_is_tab()) {
    $config = _fb_tab_get_config($GLOBALS['_fb_app']);
    if (!isset($GLOBALS['custom_theme'])) {
      return $config['custom_theme'];
    }
  }
}

This fix applies to Drupal 7, you cannot set the theme as the module tries to on line 121 to 123 in Drupal 7, it only works in Drupal 6, so you have to add this hook to get it working for Drupal 7.

Update:
If i click a menu link inside the tab the custom tab theme is once again ignored and uses the default.

Dave Cohen’s picture

Status: Needs review » Fixed

Thanks for that. Pushed the fix.

chrol’s picture

i too have an issue with the specific theme not showing.

Could it be related to i18n module using urls of form
http://www.site.com/sv as root when using Swedish language?
(and http://www.site.com/en for english?)

Clean URL's are working for plain drupal pages including i18n feature.

Dave Cohen’s picture

It could be related. Try disabling i18n, and re-syncing properties for your facebook app. See if the theme then works.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

vidra’s picture

subscribe