Topic-icon Page Tab/Canvas view problem with RocketTheme Templates

Support Specialist
Going to be deep-diving this a little bit later tonight to figure out what the heck is going on. The times it works vs when it doesn't is simply if you've hit the Page Tab "recently" before you try the tag page. "Recently" is defined by however longer you session timeout is set for. Bascially, JFBConnect sets a variable to note the user is on the Page Tab. If they then visit your live site, we need to 'break out' of the Page Tab canvas that the user was seeing (which is what the ?jfbcBreakout=1 means).

When it works, either the session has timed out (so our variable isn't set) or you simply didn't go to the Page Tab at all first.

That will explain your seemingly random results.. but obviously doesn't fix the issue.

If you would, please Private Message me super admin credentials to the site. Not sure I'll use them tonight, but may be handy to try something if necessary. For testing, the site may go down very quickly, but shouldn't be more than a minute here and there... just so you know.

You can PM me by clicking the arrow under my picture (<----) and hitting the mail icon.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Sounds good, thanks Alex! I just sent you Super Admin credentials, and I'm taking a backup of the site right now.

Feel free to play around with it, it's ok if there's a little down time due to testing. I'll just be happy to have this sorted out. :)
The topic has been locked.
Support Specialist
Ryan,
Well now.. done a lot of testing, and *think* you're pretty much good to go. I implemented the code from the steps above, and also added some of the code for the upcomging 4.1.1 release which lets you select a template style instead of just a template in the Page Tab configuration. However, setting the template style still doesn't work for RocketTheme templates for the reasons mentioned above, but it still helps get over one of the hurdles.

The redirect looping was fixed (we think) as well by adding an additional ?ref=fb query string to the URL the visitor is going to. The ref=fb really has no purpose, but could be used for tracking in analytics if you wanted to.. we just need to add a query string to break some weird caching that was going on...

So.. I think things are good. The template style still needs to be hard-coded into the Gantry template file. Additionally, for the Page Tab, at the top, the word "Articles" is showing. I think that's simply a configuration option from your template.. I don't think we changed a setting to do that.. but if we did mess something up, I apologize.

Definitely let us know how this goes. Either way, I think we're closer, and we'll be making a few changes to the 4.1.1 release to hopefully make you not have to deal with this again.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Thanks for working after hours on this! I see what you mean about the ref=fb query string, it seems to only appear when a user has recently been on the Facebook tab created by JFBConnect. Do you know how long those user sessions are set to? Or is it defined by the "User Session" parameter in Joomla's global config?

I did notice a couple of strange things...

1. If I visit the Facebook tab, and then go to the RidePros homepage, none of the homepage content modules appear, I only see the footer modules (Menu Module, Follow Us, and Footer Links) . This looks like an Item ID problem, as the "Home" link isn't being indicated as the active menu item (You can see the "Home" link if you're logged in on the front end). My guess is the code you added to kick the page out of the redirect loop is losing the Item ID.

2. I see the Facebook tab page has the "Articles" H1 at the top, as well as a module and a RocketTheme logo in the footer. Neither of those should be there, I've got those features turned off on the pages being ported to the tab page, and the CSS was cleaned so there shouldn't be any gray coloring around the images. Here are the non-sef URL's I'm trying to pass:

Fan Gate Page = www.ridepros.com/index.php?option=com_co...lang=en&view=article
Fan Page = www.ridepros.com/index.php?option=com_co...lang=en&view=article

If you click those links, you'll see it's the default Gantry template and there aren't any other features loading on the page... no logo, menu, modules, etc, just the images. Not sure if there's a way to pass those exact URLs to the tab pages, but if so, it would ensure that the pages show up correctly on Facebook.

Other thoughts.... I checked the CSS of the code showing up on the Facebook tab and some classes appear to be missing. In Gantry, you can choose a template "Profile" and assign it to different menu items. This lets you apply CSS rules and other Gantry features on a per-menu-item basis. In the <body> tag at the top, it should have the class "cssstyle-style4", but I don't see it in the Facebook tab (it is in the non-SEF URLs above). This makes me think that the template "Profile" value is not getting passed to the Facebook iframe, which could be why it's not displaying as I thought it would.

I hope this feedback helps, let me know if anything needs clarification. And thanks again for the assistance!
The topic has been locked.
Active Subscriptions:

None
Hey Alex, I just got back to work where I have a PC. I checked the site in IE 9 and I can't view the homepage at all. Every time I try to navigate to the homepage, I get redirected to www.ridepros.com/index.php?option=com_co...mpl=component&id=358

I can view other pages on the site without issue. For me, this is only happening in IE, and I haven't viewed our facebook tab in IE since yesterday. Clearing temporary files and cookies didn't help either. :/
The topic has been locked.
Support Specialist
Just tested from IE9, and not getting redirected. Not sure what could be causing that, especially if it's browser specific.

Investigating this and the other post above...
Alex
The topic has been locked.
Support Specialist
No great answers on the IE9 issue yet.. but other answers to the other questions.. so.. a start!

The session length is indeed set in the Global Configuration area of Joomla. Once that time expires without the user taking any action on the page, our session variables vanish like a pumpkin, an should revert things to 'normal'.

For the styles, I think those are all occurring because the Itemid isn't set in the URLs JFBConnect uses. We don't expect template styling by menu ID.. obviously something we should probably look into. It's not something commonly used though (even though it's a great/powerful feature), so haven't heard of that issue before. I can't get into the site to fix right now, but if you want to hard-code the Itemid onto some links, that should fix you up. All changes are in the /components/com_jfbconnect/libraries/canvas.php file.
In the setupPageTab function, around line 140-145, you'll see a line like below (around line 155-160):
$app->redirect('index.php?option=com_content&view=article.....
Put the Itemid in there like below (not changing anything else:
$app->redirect('index.php?Itemid=322option=com_content&view=article.....
That should fix the Reveal Page.

The main Page Tab (after a user Like's the page) needs the Item ID set in the URL you set inside your Facebook Application. If it's already set properly there, let us know. You may want to try both the SEF and non-SEF versions in the Facebook App configuration and see if either makes a difference (though they should both work the same).

Hopefully, that will fix up a lot of the styling issues.

Still investigating the IE9 stuff.. but can't recreate. If you can test from another PC, please do and let us know if you're seeing it there too.

Thanks,
Alex
The topic has been locked.
Support Specialist
Thinking about the style issues more, we may have to really setup a similar profile setup like yours. Don't use RT templates often, so will have to investigate. However, with the code change above where we're forcing the style, it's possible that's conflicting/overriding the per-menu item overrides. Not sure, but definitely a possibility and simply don't know how Gantry is storing and using those per-menu item profiles.

Just talking out loud..
The topic has been locked.
Support Specialist
Ryan,
Alright.. more thinking. I think it would help if we had a little reset and clarification on things. Obviously, JFBConnect isn't working perfectly for you, and we're trying to tackle a few different issues at once, which may be confusing things a bit (fix one thing, break another, etc). Though I think we're making progress, if you could quickly answer the following questions, that could help immensely.

Can you tell me for your site, Page Tab, and Reveal Page, how you want things configured:
1) Main landing URL (www.ridepros...)
2) Template to be used (rt_gantry, rt_radiance, etc)
3) Style to be used (ID or name you created in the admin area)

For the home page, the landing page is obviously just the home page. The page tab and reveal page tab were specified above. The Template and template style for each are the most interesting, just to know if they're the same for each of the 3 views. If so, it opens up a few different (easier) fixes instead of trying to get our template/style switcher to work, we just need to make sure all the URLs are correct (Itemid, etc).

Thanks, and sorry for the post-spam :)
Alex
The topic has been locked.
Active Subscriptions:

None
Yeah, I think you might be right, this will probably need more investigation. Here's what I just figured out...

1. JFBConnect was set to use the Modulus template, not the Gantry default template. It looks like that is why the CSS profiles weren't being applied. As soon as I changed the JFB tab settings to use the Gantry default template, the correct CSS classes loaded. I'm not sure if this fixes all scenarios of using "Template Profiles", but it did fix the issue for me. :)

2. I hard coded the itemID as you suggested and the word "Articles" disappeared from the Reveal page. Sweet!

3. I updated the facebook application to use the non-SEF URL for the main tab page and it seems to be appearing correctly. Double sweet!

4. IE... definitely having problems on multiple machines in my office. For some reason, I still can't access the homepage from IE on my machine. I asked a coworker to open RidePros in IE... he very rarely goes to this site, and has probably never visited it from IE before... he was able to view all pages without issue. He then opened up our Welcome tab on facebook and clicked that Tag link we shared on our wall. At this point, IE entered the redirect loop and never kicked out of it. The browser resolved with the jfbcCanvasBreakout=1 query parameter. Here's the other strange part: he could still click around the site as usual and the ref=fb parameter was not being appended to the URLs. The only page he couldn't open was the Tag page URL that was shared on our facebook wall (either through the Ow.ly shortlink or the direct URL).
The topic has been locked.