Title: [plugin: Simple Facebook Connect] Breaks wp e-commerce
Last modified: August 20, 2016

---

# [plugin: Simple Facebook Connect] Breaks wp e-commerce

 *  [miocene22](https://wordpress.org/support/users/miocene22/)
 * (@miocene22)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-breaks-wp-e-commerce/)
 * For the attention of Otto but anyone who can help is welcome to answer.
 * I’m trying to use you facebook plugin to auto-post new blog posts to facebook.
   That is the only functionality I require.
 * However when the Simple Facebook Connect is enabled it seems to break single 
   product pages within my store which uses wp e-commerce.
 * I get this error when I visit a single product page:
    `Fatal error: Cannot redeclare
   makethumburl() (previously declared in /home/serge870/public_html/wp-content/
   plugins/wp-e-commerce/wpsc-theme/wpsc-single_product.php:50) in /home/serge870/
   public_html/wp-content/plugins/wp-e-commerce/wpsc-theme/wpsc-single_product.php
   on line 50`
 * This refers to a custom function I wrote a while back which calls image thumbnails
   for the products. I.e. I wrote my own code to get the multi images for products
   rather than buy the gold cart. The function can be seen here: [http://pastebin.com/ZK1V9KSv](http://pastebin.com/ZK1V9KSv)
   and works perfectly with the facebook plugin disabled.
 * Deactivating the Simple Facebook Connect plugin solves it. Any ideas about this
   conflict?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [mistersilverio](https://wordpress.org/support/users/dennissilverio/)
 * (@dennissilverio)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-breaks-wp-e-commerce/#post-2346608)
 * I have the same problem. I want to use simple connect, but it causes WP commerce
   plug-in not to work. Anyone know how to fix this or another Facebook integration
   plug in that would work.
 *  [stonefree](https://wordpress.org/support/users/stonefree/)
 * (@stonefree)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-breaks-wp-e-commerce/#post-2346617)
 * After a couple hours or research I found a solution. Apparently the problem affects
   a few other plugins as well. Not sure the exact problem, but it seems to have
   something to do with plugins that alter the main database query. See [here](http://wordpress.org/support/topic/plugin-simple-facebook-connect-sfc-conflicting-with-shortcode-which-loads-custom-loop?replies=11)
   for a detailed discussion between Otto and another plugin developer.
 * Anyways, to fix the issue with WPEC, go to sfc-base.php and look for function
   sfc_base_meta. This is where the problems are happening. Look for if (is_singular()){
   
   global $wp_the_query;
 * After this I included
 *     ```
       if ($wp_the_query->query_vars['pagename'] == 'store' || $wp_the_query->query_vars['post_type'] == 'wpsc-product')
                   return;
       ```
   
 * You may have to modify this a bit depending on how your store is set up and the
   complexity of it, but this seemed to do the trick for me. Basically, it ends 
   the function if I’m on the “Store” page (for wpsc-products_page.php) or if I’m
   on a single product.
 * There’s still the minor issue of the Publisher module causing a fatal error (“
   Fatal error: Call to a member function get() on a non-object in /wp-includes/
   query.php” ) when trying to Edit Page for “Store”, but that’s not something you’ll
   likely need, and can always disable the Publisher module if needed.
 * Hope this helps!
 *  [tejas.ampheetech](https://wordpress.org/support/users/tejasampheetech/)
 * (@tejasampheetech)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-breaks-wp-e-commerce/#post-2346618)
 * Hello stonefree,
 * Many many thanks for your help.
    Your suggestion work like a charm.
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[plugin: Simple Facebook Connect] Breaks wp e-commerce’ is closed to 
new replies.

 * 3 replies
 * 4 participants
 * Last reply from: [tejas.ampheetech](https://wordpress.org/support/users/tejasampheetech/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-simple-facebook-connect-breaks-wp-e-commerce/#post-2346618)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
