I've just installed the module, and created the app in facebook, and everything seems to be working, except for links. All links have a url similar to this:

http://node/11722?_fb_fromhash=2389b2e54e8ecf0d7466771db5c89221

Any ideas on how I can fix this?

CommentFileSizeAuthor
#11 fb_app_canvas.diff4.13 KBDave Cohen

Comments

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

can you give me the URL of a page showing this?

What code is generating the links? Are the links in the navigation block broken?

georgedamonkey’s picture

The url of the app is here:

http://apps.new.facebook.com/menashapl

Yeah, the links in the navigation block are broken, as well as all the links within the content for taxonomy, the posts themselves, etc. Not sure what code is generating the links?

Thanks for taking a look at it for me, I really appreciate that.

georgedamonkey’s picture

It looks like it's adding in 'http://' for every link. If I can somehow get it to stop putting that in, I'm thinking it'll work. Does that make any sense?

Dave Cohen’s picture

That's not the fix. You'll end up with apps.facebook.com/node/NNN when what you need is apps.facebook.com/SOMETHING/node/NNN.

Maybe if you set the HTML base attribute in the page template. Hmmmm....

This should all be easier with improved url alters that I think will be in D7. Until then this remains tricky.

Have you enabled the DFF devel module? If not please do.

georgedamonkey’s picture

How do you set the HTML base attribute in the page template?

I hadn't had the DFF devel module enabled, but I do now.

georgedamonkey’s picture

Now that I have the DFF devel module enabled, this is what I get:

Facebook Devel Info
Page Status = Rendering FBML canvas page.
fb_facebook_user = 1335487366
users_isAppUser = 1
users_isAppUser(1335487366) = 1
local user = admin
fb_get_fbu = 1335487366
base_url = http://www.menashalibrary.org
base_path = /
url() returns = /fb_cb/11722/
$_REQUEST[q] is = fb_cb/11722/
arg(0) is = frontpage
arg(1) is =
session_id = fb_canvas_11722_2.jeLoB_qdS8GuzqQL39fY9Q__.86400.1241294400-1335487366
session_name = fb_canvas_11722_SESS8ca7c826e2a224dd5c7e4d73cb733038

I'm guessing the problem is:
base_path = /
?

Dave Cohen’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Active

I'm seeing a similar problem on one of my sites. It used to work fine, so something - drupal or facebook - has changed and this is a nasty side effect. In my case, many links are fine, but some are as you describe.

I'll do my best to track this down.

Dave Cohen’s picture

Title: All links are broken on facebook app » Links broken on canvas pages
Component: FBML Theme » Canvas Pages
Assigned: Unassigned » Dave Cohen
Priority: Normal » Critical

I see the problem. Hope to fix later today.

georgedamonkey’s picture

Thank you!

plantucha’s picture

fix from may 3 doesn't change anything for me, still broken ALL relative links
http://apps.facebook.com/metrication/

Dave Cohen’s picture

Status: Active » Fixed
StatusFileSize
new4.13 KB

Just checked in a fix, attached. Let me know if there are still problems.

To repair your sites, apply the patch or get the latest version from CVS. Then run update.php script. Then visit each of your Facebook Application nodes edit page and click submit (even if you make no changes). After all that the links on canvas pages should work again.

Not long ago I changed the app form to learn the canvas page suffix by querying facebook, rather than prompting the user. But I was overzealous and removed important info from the fb_app database table. Sorry 'bout that.

swellbow’s picture

Just started trying out the fb module (today, same date as patch above) and found this issue. Applied the patch, followed instructions. Worked great!

Thanks! Looking forward to exploring this more. Very promising!

georgedamonkey’s picture

YES!!! THANK YOU!!!!

I downloaded from cvs, and it works fantastic.

Thank you so much!! I owe you a beer my friend!

h.gde’s picture

Does this mean I have to resave every node? I tried saving the one Facebook Application node, but that makes no difference.

Dave Cohen’s picture

No, of course not every node. You should just have to update the files, run update.php, edit and save the Facebook Application nodes which have canvas pages enabled. For most sites that will be just the one and only Facebook App node.

If you're sure you've done those things, and enabled the fb_devel module, and you still have a problem, then post more details. Like which links are broken. If they're broken the exact way described above, I strongly suspect you haven't updated everything.

h.gde’s picture

Hi Dave, Many thanks. The links were broken exactly as above. But it is all working fine now, all I did after posting #14, was to disable the fb_fbml theme under themes, clear all the blocks settings and cache and re-enable the theme. After this, it all started working as it should.

Status: Fixed » Closed (fixed)

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

wastrilith2k’s picture

Version: 6.x-3.x-dev » 6.x-2.0-rc2
Component: Canvas Pages » Code

Is this patch applied to the currently released version (RC2 I think)?

I'm getting this same behavior and looked at the patch notes and the sections in the fb_app.install file don't match.

Also, the links from the project page on drupal.org to the dev versions result in 404s.

James