fb_fbml theme detected but not working on canvas pages
| Project: | Drupal for Facebook |
| Version: | 6.x-2.x-dev |
| Component: | Canvas Pages |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Hello, for starters, I read the README.txt from start to finish.. and have checked the issue queue in entirety as well
I'm getting the error FBML Error (line 29): illegal tag "body" under "fb:canvas"
I understood this to mean that fb_fbml theme is not being detected... but it actually is. I enabled it in the admin/build/themes section and it is showing up as a separate theme in the admin/build/blocks section
I forced it to be the default theme for testing purposes and then, everything starts works fine but it breaks up my original website (obviously), so its not a route I can take. I enabled fb_devel and that indicated just one error related to "&". I fixed it but I guess it is unrelated to the theme not getting detected
Any idea what else I need to do? Maybe I am missing something simple here...

#1
Subscribe: FBML Error (line 46): illegal tag "body" under "fb:canvas"
#2
Making the fb_fbml theme default did not alleviate the problem. I definitely don't have any modules that are initiating the theme layer prematurely.
#3
The clues.
1. Submitting a form works fine. I'm building a search engine application and I get the initial screen (with the form), and I can get the form.
2. Here's a link that works:
http://apps.facebook.com/sheet-music-devel/search/sheetmusic/test?filters=instrumentation%3ABass&_fb_fromhash=877cb895801c9bf9e7b60ea057e8939c3. Here's a link that breaks:
http://apps.facebook.com/sheet-music-devel/sheetmusic/5854274/test?_fb_fromhash=877cb895801c9bf9e7b60ea057e8939c#4
More clues.
This link doesn't work:
http://apps.facebook.com/sheet-music-devel/sheetmusic/5854274/test?_fb_fromhash=877cb895801c9bf9e7b60ea057e8939cThis link, without the _fb_fromhash param, DOES work.
http://devel.presto-sheet-music.com/fb_cb/1/sheetmusic/5854274/testInterestingly, these are both showing up in the canvas page.
The two links are being produced like this:
<?php$v['link'] = l($v['title'], $v['url'], array('absolute' => TRUE));
if ($v['imageurl']) {
$v['image'] = l(
theme('image', $v['imageurl'], $v['title'], $v['title'], array('align' => 'left', 'style' => 'padding-right: 1.5em;'), FALSE),
'sheetmusic/' . $v['id'] . '/' . search_get_keys(),
array('absolute' => TRUE, 'html' => TRUE,)
);
}
?>
That's a bit hard to read, but the essence is that both go through l(), both with 'absolute' => TRUE. Why does one get the _fb_fromhash and the other one doesnt? And why is this _fb_fromhash screwing with the working of the code?
#5
Perhaps the final clues, and then a mystery.
My code, in both cases above, ends here:
<?phpheader("Location: $url") ;
exit();
?>
It reaches this point, in both cases, with exactly the same value for $url. However, the variation with the _fb_fromhash fails (sends the output back to facebook as a broken canvas), and the version without the hash succeeds.
So the mystery is, why?
#6
Forget everything I wrote. The error was mine. I was trying to go to an external link but was not using an absolute URL.
#7
ravdeepchawla, are you still having a problem, or was it the same site?
Robert, Let me know about your app when it is ready. I'm curious what you're up to with these modules.
#8
Dave, sent you two mails using your contact form, without reply. Perhaps into the spam bucket? Please contact me via email. Thanks!