js errors with ultimate facebook

When I go into the network admin of my WordPress 3.5.1 site and go to the facebook tab, I get the following errors in firebug:

ReferenceError: FB is not defined
[Break On This Error]

FB.init({

admin....ge=wdfb (line 694)

ReferenceError: FB is not defined
[Break On This Error]

...ch(c){return _.u}},stringify:function(f){function g(c){return h.call(this,c,a)}v...

cb=gapi.loaded_0 (line 69)

Where this really shows up is on the permissions tab, it just spins and never loads.

Also on the ‘autopost to’ tab, the ‘of this user’ dropdowns are not populated.

I did test the registration though and it did work.

There is one annoying problem with the registration though and that is the popup warning:

Information from this secure page will be submitted to a page that is not secure on bargainwp.com.

Submitting sensitive information is strongly discouraged.

Obviously I am not using a cert on my site, but I can see this warning really scaring off a lot of people.

Is there a way of removing this warning, or does it come from facebook itself?

I ask, because I have tried a number of facebook registration plugins today, and this is the first time I have seen this problem.

**btw – it would be nice to see this plugin, or another one, extended to include twitter, and google+ at a minimum. While I have found many that do this, I have not found one I like much, and most all do not work with multisite.

Finally:

Does anyone know how I get the registration to work with woocommerce?

  • Tom Eagles
    • Syntax Hero

    @shawng

    Let me pull in the developer to take a look at this, as i tried it on my install and didn’t get any issues. Could you shoot over the admin username and password to me via the contacts form and i will also take a look,

    When you say integrate with woocommerce in what way exactly do you mean?

    Cheers

  • shawng
    • Site Builder, Child of Zeus

    @Tom Eagles

    I’m guessing that you mean the main contact form here at wpmudev? If so, sure, I’ll send over the info.

    As to woocommerce, here is a great example:

    http://terrytsang.com/shop/shop/woocommerce-facebook-login-checkout/

    Basically when a customer is on the checkout page, there is no ‘login/register’ with facebook option and as I would fully expect greater than 50% of my customers users to actually register during the checkout process, it is kind of killing the concept of using this plugin.

    Maybe I just have to purchase the other one and run both plugins which kinda sucks, but given that it takes an avg of 6+ months to get changes like that made to plugins here it might be worth it.

    — yeah I’m a bit sarcastic with wpmu after going through all my tickets and seeing that everything from the past 6 months still have no solutions. It’s just been one of those days where nothing is going right.

  • Vladislav
    • Dead Eye Dev

    Hello,

    Just wanted to confirm the results @Tom got, unfortunately I wasn’t able to replicate this behavior on my install either. It could be a javascript conflict with a plugin or theme on your site, so the info you sent over will help a lot towards clearing that up.

    As for the WooCommerce/registration integration, perhaps something like this could bring the two plugins together:

    function wdfb_woo_inject_login () {
    if (!is_user_logged_in()) echo do_shortcode('[wdfb_connect]');
    }
    add_action('woocommerce_before_checkout_form', 'wdfb_woo_inject_login');

    You can add this code to your theme’s functions.php or even better, to a mu-plugin. A mu-plugin is a .php file in your wp-content/mu-plugins directory, that automatically gets executed (if you’ll be doing this, please remember to add opening “<?php” tag before any of the code).

  • shawng
    • Site Builder, Child of Zeus

    @Tom Eagles @Vladislav

    Were you guys able to see the problem I have and possibly come up with a solution?

    Like I said, this is just a demo site, so if you need to change/activate/deactivate anything, go ahead. There are VERY FEW plugins activated, pretty much the bare bones for testing Woocommerce and the facebook plugin. I am also using a theme by Woothemes for this so I know without a doubt that the theme is not the issue as they probably write the cleanest and most secure theme code on the market. (remember all code for them is audited by securi.net as well)

    btw

    thanks for the action. It worked as expected, and with a little tweaking it will be just fine.

    also:

    There is a bug with the facebook plugin, in that when I view the users page in the admin, I do NOT see the users avatar. The user sees his avatar in the admin bar as expected, but as the admin I do NOT see it.

    Normally who cares, but as I build a lot of church sites, we are VERY careful to monitor everyones avatar to make sure they are suitable for our sites.

    I’m not sure if that is a WordPress bug, or if it is a bug with the WPMU Facebook plugin.

  • shawng
    • Site Builder, Child of Zeus

    Instead of creating a new topic, I will add one more thing here, keeping it somewhat separate.

    The action worked fine for adding the facebook login button to the checkout page on woocommerce.

    However, there is a way to improve this:

    On the checkout page, you see the form the user fills out to enter first name, last name, address etc….

    Since the user has just registered/logged in via facebook, it would be really sweet and more user friendly if your facebook plugin appended what information it could to the checkout form. At the very least, it would have the first name and last name from Facebook.

    Not necessary, but one of those things that if done right would be a nice feature that anyone using the 2 plugins would love to have.

  • Tom Eagles
    • Syntax Hero

    @shawng

    Nice idea, i am sure this could be added down the road. I won’t mark this as a feature request as it will kill this as a support thread. Feel free to start a new topic on this for a feature request, you can always link back to this thread within it for context.

    Cheers

  • shawng
    • Site Builder, Child of Zeus

    @Tom Eagles

    I just now noticed that I accidentally added my server login info as a question instead of the contact form. Thank God, someone saw that and erased the info.

    I’m guessing that means you never got the login info to see the js errors on the site from facebook?

    *I wish there was a pm system here to send you the info. If you still want to see the errors do I use the contact form on the site footer here? Seems strange to send login info to anyone who could see the contact info, but if that is how, then ok.

  • Tom Eagles
    • Syntax Hero

    @shawng

    Hi Sean, that was me i copied and pasted it to a file before deleting it. in future if you use that form select i have a different question, it send it via email to our inbox where i can pick it up. I spotted it a few seconds after you posted it as i was online at the time.

    Cheers

  • shawng
    • Site Builder, Child of Zeus

    @Tom Eagles

    So you were able to see the jquery error in firebug then?

    Any ideas on how to solve the issue?

    As I said in the other post, it’s just a dummy site, so no worries about breaking anything while troubleshooting the jquery issue.

  • Tom Eagles
    • Syntax Hero

    Hi @shawng, i wanted to pick this up again this am and also to pass on the logins to vlad, i had your login creds in a notepad without saving them and windows did an update and restart on me. could you please be so kind and email them to me at:

    tom.eagles at incsub dot com

    Cheers

  • shawng
    • Site Builder, Child of Zeus

    Thanks buddy, I just now got online and see that you had answered back again. Sorry I didn’t check earlier.

    I setup a new demo site and at the moment the ONLY plugin activated is the ultimate-facebook plugin (network activated) on my sub-domain install.

    As soon as it is activated I get that FB is not defined error.

    Normally I wouldn’t care but these errors are making the site unusable in that I can’t even move or expand my widget areas among other problems.

    Being a fresh install, I am actually shocked that other people are not having these problems, as this happens on all 4 sites I tried it on.

  • shawng
    • Site Builder, Child of Zeus

    @PC

    Hoping maybe you have some time to help?

    I sent an email to your profile email address with site info just in case :slight_smile:

    Poor Tom won’t even be awake for hours to come. Looks like me and you are closest to a working schedule.

  • shawng
    • Site Builder, Child of Zeus

    @PC

    Did you see my email?

    I’m just trying to get some dev to find my thread here to help me solve the js error so I can reactivate all the client plugins and get their site going again. It’s only 1am, so I can make it a few more hrs, but eventually I’ve got to get some sleep. Just sleep better with problems of the day solved :slight_smile:

  • PC
    • WPMU DEV Initiate

    Hiya,

    I just logged in to your site and do not see any errors.

    Here is a screenshot

    Can you make sure that the browser is loading the latest js. Just reset the browser to default settings and update it to the latest version and see if that helps.

    Please advise.

    Cheers, PC

    [attachments are only viewable by logged-in members]

  • PC
    • WPMU DEV Initiate

    Hello @shawng

    That video was very helpful.

    I tried that on my system, same firefox version (I am using windows 7) and it works absolutely fine with no issues at all.

    Can you please install a new browser (Chrome ?) and try it out ?

    All what I feel right now is that its just your browser. Testing on another browser will help.

    Cheers, PC

  • shawng
    • Site Builder, Child of Zeus

    Damn, it is a bug in Firefox…… arghhh 2 days wasted over a stupid browser bug, sometimes I absolutely hate the computer…

    Thanks for letting me know. Not sure how to debug this issue so time for me to spend my day on google again.

    Strange part is this is broken on 4 different sites using the ultimate facebook plugin, yet virtually everything else works. It has something to do with this specific plugin on this specific browser, go figure…

    thanks for your help.

  • PC
    • WPMU DEV Initiate

    Hey Shawn,

    Browser bugs are the most common issues and sometimes a nightmare for the website designers.

    Why don’t you just reinstall Mozilla on your computer and get rid of any issues. Mostly the addons mess up with things.

    Cheers, PC

  • Tom Eagles
    • Syntax Hero

    @shawng

    Hey sorry about my dropping off this ticket, basically i have been off all week sick :slight_frown:

    Glad you finally narrowed this down to a browser issue. Let us know if you find out what was causing the issue and Ve may be able to resolve it in an update

    Cheers