I hope there is an easy answer to this!
I want to set up a site with automatic Facebook connect to Drupal (I have done this before and it works fine)
I have gone through the whole process, creating the Facebook app, putting the Facebook libraries in place, everything seems ok... then I go to create new content and I notice that every javascript element on the page has been switched off: all the menu options which can be opened/hidden are disabled and don't show as links, and CKEditor is no longer present in the text body field.
Switching of Drupal for Facebook brings everything back to normal.
I am using Drupal 6.26, and have tried this in Firefox and Chrome in Mac OS and Windows, it seems to be the same systematically.
The only problem I have been able to find is in the Javascript error console I am getting this:
Horodatage : 11/11/12 14:52:18
Erreur : Error: Invalid DOM node passed to FB.XFBML.parse()
Fichier Source : http://connect.facebook.net/en_US/all.js
Ligne : 38I hope you don't mind me setting this to critical - I certainly can't use FB unless this is corrected.
The only odd thing I can think about the site is that it might have something to do with the Language switcher block that I have enabled. But I've not been able to determine a clear relationship
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | imce_correct.jpg | 23.86 KB | joel_guesclin |
| #9 | imce_incorrect.jpg | 25.16 KB | joel_guesclin |
Comments
Comment #1
Dave Cohen commentedI've lost track of the other thread, but this is a dup.
It's fixed in the latest builds. Unfortunately drupal.org wont show you that there is is 3.4-rc1 build unless you explicitly look for it: http://drupal.org/node/178857/release
I will release 3.4 shortly to clear up confusion...
Comment #2
Dave Cohen commentedAlso it's not that javascript is switched off. It is that a fatal error will stop all subsequent javascript from working.
Comment #3
joel_guesclin commentedI tried to find an existing expression of the problem but could not. I've just tried a very summary installation of FB 3.4-RC1 (just switched on the modules and flipped back and forth using the Language Switcher bloc), and it seems fine. The Javascript console only gives me this message:
FB.getLoginStatus() called before calling FB.init().I'll go ahead and try it out on a production site.
Do you know Lucky Luke? The man who shoots faster than his shadow....??
Comment #4
joel_guesclin commentedInstalled it - seems to work fine
Comment #5
joel_guesclin commentedI spoke too soon....
Everything was working until I went to use IMCE (with CKEditor) to load an image into a page. Clicking on "Browse Server" in the IMCE image dialogue caused these errors to appear in the console:
and
As a result none of the buttons in the IMCE file handler work, and it becomes unusable
Comment #6
Dave Cohen commentedThis can happen when a page does not include Drupal's page bottom (formerly called footer, but not to be confused with the visible footer). Sounds like IMCE is using a page template without the bottom, or maybe not using a template at all.
Agreed modules/fb should not fail in this case. Just know that facebook JS will not work on those IMCE pages. I.e. you could not render XFBML on those pages, although I doubt you'd want to.
Comment #7
Dave Cohen commentedThis can happen when a page does not include Drupal's page bottom (formerly called footer, but not to be confused with the visible footer). Sounds like IMCE is using a page template without the bottom, or maybe not using a template at all.
Agreed modules/fb should not fail in this case. Just know that facebook JS will not work on those IMCE pages. I.e. you could not render XFBML on those pages, although I doubt you'd want to.
Comment #8
Dave Cohen commentedI believe fb 6.x-3.4-rc1 has a fix for this. See https://drupal.org/node/178857/release, or try .dev build.
Comment #9
joel_guesclin commentedI'm afraid it still doesn't work, I've tried with the DEV version of 24/11/2012 but no luck. I don't know if it helps, I've attached a screen shot of the top of the IMCE window to show a comparison between what it should look like and what it looks like when FB is switched on - you can see the various buttons missing.
Looking at the HTML code and comparing with other pages, I notice that in the non-working IMCE page the FB addin that seems to provoke the error gets included at the top whereas in other pages it seems to get included near the bottom. I don't know if that makes a difference.
In fact, it would be better if FB didn't get loaded in this page at all, since it is basically a popup window, not part of the site, which allows you to select images for uploading to the server, or to choose already uploaded images for inclusion in the text. But I don't know if it is possible to make that kind of distinction.
Comment #10
Dave Cohen commentedDo you have a debug tool like firebug? Does it give you a more specific error message? Did you flush all caches after upgrading modules/fb?
Often facebook buttons are needed on popups like this. Sure, not always, but I don't want to complicate the code with an attempt to figure that out. I do want the code to be resilient enough to not screw up in this case.
Comment #11
duncan.moo commentedI can confirm that the latest update 7.x-3.3-beta5 also sorted out this issue on D7.
Thanks Dave
Comment #12
joel_guesclin commentedVery odd.
I went back and checked it out again. In theory it should not have been a problem with the cache, because all caching was switched off on the site. I was all ready to use the Firebug console to get more detailed information, but.... now it works (or at least it did last night on my PC). Perhaps it is the caches in Firefox that needed clearing out.
Many thanks!
Comment #13
Dave Cohen commentedbetter solved mysteriously than not solved at all. Change status if it comes back.