When I delete a node from within the FB canvas iframe I am presented with a blank white iframe page (all the facebook stuff is there, but the iframe is empty). The node is actually deleted, but the page is not redirected back to the view where the delete operation was originated.
When I manually navigate back to the correct page I get the standard drupal message telling me that the node was deleted.
I can see that the redirect URL is in the address bar, and it works fine from the connect page on my website. I only have the problem on canvas iframe pages. Is this something anyone has seen before?
Ntrepid8
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screen shot 2010-12-24 at 2.24.34 PM.png | 208.68 KB | ntrepid8 |
Comments
Comment #1
ntrepid8 commentedThis happens in firefox and safari. I haven't tested IE yet.
Ntrepid8
Comment #2
ntrepid8 commentedThis is happening on node edit as well. Could this be a theme issue? It's not happening on Drupal for Facebook, but I can't delete my node there. I am using Sky.
Do I need to hack something to get it to redirect back to the page properly?
Ntrepid8
Comment #3
Dave Cohen commentedDo you have something like global redirect enabled?
Comment #4
ntrepid8 commentedNope. I think the only thing I have related URLs is Path. I haven't always had this problem, it must have been something that cropped up recently, but I don't know exactly when.
It looks like the drupal_goto (I think you have a canvas page equivalent, but I cant remember the name) is not firing after the node delete (or edit). It's got the correct path in the address bar where it's supposed to go. The URL just is not being rewritten, and the page not reloaded after the delete or edit operation is complete.
Ntrepid8
Comment #5
ntrepid8 commentedI have been running through testing on all browsers and it looks like it works fine on IE, but is failing on FireFox and Safari. I haven't tested it on chrome.
Ntrepid8
Comment #6
ntrepid8 commentedNow it happens sometimes on Safari, always on firefox, never in IE. I wonder if this is a facebook problem?
Ntrepid8
Comment #7
Dave Cohen commentedHuh. When a problem only happens sometimes, I'm not sure what to suggest. Maybe use a debugger or packet sniffer to determine exactly what requests are coming into your server and exactly what is being returned.
Comment #8
ntrepid8 commentedThis seems to have gone away with the upgrade to RC1. Thanks!
Comment #9
Dave Cohen commentedComment #10
ntrepid8 commentedI have been researching this more lately, and the problem seems to crop up when clicking the "edit" or "delete" buttons in a view. When just looking at the node and editing it or deleting it, the process works, but the site hangs on the redirect back to the view, if the edit or delete process was started from the view.
When you click "edit" from a view this variable is added into the address bar:
I remember reading somewhere that having that "fb_canvas_destination" in the address bar would cause the redirect to hang. Is that still the case?
I don't know how to try and reproduce it on DFF. Have you seen this at all?
Ntrepid8
Comment #11
Dave Cohen commentedLet's not re-open this unless it is actually reproducible.
You could try just typing in a URL like one in your comment and see what happens.
Comment #12
ntrepid8 commentedOk, here is what happens when I click the "login" link on the DFF forum from the canvas page. The same sort of error.
The problem seems to manifest specifically for me when trying to edit a node from an "edit" link in a view. If I navigate directly to the node and click edit, it seems to work fine. I think that is what confused me before. I didn't put together than editing, with the intent to redirect back to the view, was when the problem occurred, rather than just editing a node.
Is there anywhere on your canvas page that I could click an "edit" link from a view to try and edit a node? I think that might reproduce it again on your site, and in the same manner that it's happening on mine.
Ntrepid8
Comment #13
ntrepid8 commentedOk, more info on this:
When I construct the link manually it works fine, so it must not be the "fb_cavas_destination" part, but there are a lot of other things that get encoded into the url like these:
session
session_key
secret
expires
access_token
Are these supposed to be included in the URL for a "edit" link in a view? When I use a php custom field and l() all of those parameters are not loaded into the URL and it's fine. I guess that's what I'll do.
here is my php code in the custom field
DFF is rewriting the URL query string to "fb_canvas_destination=view_i_came_from" correctly when on a canvas page.
Comment #14
ntrepid8 commentedIs DFF supposed to rewrite the application secret into the URL?
Comment #15
Dave Cohen commentedIt will rewrite the url so the path includes "fb_cb/APIKEY" (never the secret).
I'm puzzled as to why the fb_canvas_destination would work in some cases but not others. I'm not sure what the "hang" means either. There's probably an error in drupal's log or your apache error log.