first let me say excellent job on this module. the issue I am having has to do with views filters in the fbml canvas page. I have a view that I want to allow users to filter the content to find a specific node. The issue that occurs is when the user has selected the parameters that they want and hit apply, the page is redirected to the drupal version of the view on my domain with the proper filters. I have noticed that with other forms like comments when the submit button is pressed the page is directed to the domain then quickly redirected to the proper facebook page, if this is possible for views it would be great. Also I tried to use the iFrame setting for the canvas page and I was given an iframe with a set frame height. how would I be able to resize the iframe to include all of the pages content and eliminate the double scroll bar dilemma.

Comments

poundy’s picture

*Bump*

Dave Cohen’s picture

The fb_canvas.module has to do some processing of each page, to re-write URLs of links and form actions. I think the views filter form has an unusual action attribute, and the module is obviously doing the wrong thing with it.

Views is such a popular module, that I agree this should be supported. I just haven't had time to reproduce it or figure out a solution.

Can you use your browser's view source feature to see the <form...> tag which views is writing to the page? Paste that with the complete action attribute here. Thanks.

Dave Cohen’s picture

Status: Active » Needs work

Ok, at last took the time to reproduce this.

Here's a quick workaround that seems to be working OK. But I'm pretty sure there's a better fix, so this is not what I plan to check in.

Let me know if this one-line change solves the problem for you, though.

Index: fb_canvas.module                                                         
===================================================================
--- fb_canvas.module    (revision 2145)                                         
+++ fb_canvas.module    (working copy)                                          
@@ -418,7 +418,7 @@
   global $fb;                                                                  
                                                                                
   // Test whether a form has been submitted via facebook canvas page.          
-  if ($fb && isset($_REQUEST['form_id']) && isset($_REQUEST['_fb_handling_form\
']))                                                                            
+  if ($fb && isset($_REQUEST['_fb_handling_form']))                            
     return TRUE;                                                               
 }                                                                              
                                                                                

Dave Cohen’s picture

Status: Needs work » Needs review

OK, I think I will check in the patch above. Should prevent this problem in the future, and on other forms.

Another way to prevent this I've just added to the documentation: http://drupal.org/node/694800