Every single one of my clients demands the ubiquitous "Share this" links on each of their product pages.

Since the Service Links module provides this functionality, and is already included with the Commerce Kickstart distribution I decided to try to use it.

I went to admin/config/services/service-links and checked the box to enable the service links in the content for the Full content view mode, and they show on the product page, but they display with errors from from Facebook complaining that "The href URL must be absolute".

I confirmed the same error on a fresh instance of commerce_kickstart-7.x-2.12. Here's a screenshot to show you what is going on:

I realize this is a problem with the Service links module and according to this thread the problem has been fixed in service_links-7.x-2.x-dev and will be included in the next 7.x-2.3 release:

#2039431: Facebook like button

Normally this is where I would use `drush dl service_links-7.x-2.x-dev`.

However, since service_links-7.x-2.x-dev is part of the commerce_kickstart distribution, and is tucked down in profiles/commerce_kickstart/modules/contrib/service_links , and also appears to already contain one patch, can you guys tell me what is the best way to proceed here?

Comments

cuongnq2410’s picture

You can fix:
-File "service_links/js/facebook_like.js"

iframe.src = $(this).attr('href').replace('http://', '//').replace(/http[s]*\%3A\/\//, '');
);

to

iframe.src = $(this).attr('href');
);

Maybe it work

lsolesen’s picture

Issue tags: +Behat
lsolesen’s picture

This patch in #7 from this issue #2207181: Facebook “like” error seems to solve the issue. The patch however is not on drupal.org, so it should probably be rerolled.

lsolesen’s picture

It seems that updating to the latest dev version of service links solved the issue. Wait on the tests to see whether it builds correctly. https://github.com/commerceguys/commerce_kickstart/pull/43

  • Commit 0d73b4a on 7.x-2.x by lsolesen:
    Issue #2196643 by Zach Harkey: Service Links error on Facebook widget
    
lsolesen’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.