Closed (fixed)
Project:
AddThis
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2012 at 03:40 UTC
Updated:
15 Jul 2013 at 17:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
matglas86 commentedPatch f0c4a introduced a bug I tried to fix in #1403210: Https secure page fails with AddThis script.
Please see if this patch fixes it.
Comment #2
kenwest commented@matglas86,
Your patch seems to do the trick.
It appears you're assuming the URL starts with "http"? What if the administrator puts a copy of the addThis Widget JS in a local file for caching purposes? eg "js/addthis/cache/widget.js". Will this function do the right thing and leave the URL unchanged?
Perhaps you should check the URL starts with "http://" and replace that?
Thanks,
Ken
Comment #3
matglas86 commentedYou are absolutely right. Here is a better check.
Comment #4
kenwest commented@matglas86,
I've applied your patch, and it continues to work for me. However, I'm not keeping the widget js on-site, so I'm not testing it for the case you're trying to cover.
Thanks!
Ken
Comment #5
matglas86 commentedOk thanks. Ill commit it and if problema arise we'll notice. :)
Comment #6
matglas86 commentedCommitted at 066ca7e
Comment #8
TelFiRE commentedSo are we forced to use dev if this issue arises? It doesn't appear to have been committed to non-dev as it's been over half a year since the 'other' release was updated but you're recommending not to use the dev on the project page. Not sure what the best practice would be.
Thanks for your efforts
Comment #9
sstedman commentedI can confirm that the patch in #3 works.
After spending quite a bit of time trying to figure out why I could not complete an order in Ubercart, I finally tracked down the exact url listed by the OP with Firebug:
"addthis":{"widget_url":"httpshttp#pubid=MY_ID?async=1"}, which led me to this page.I don't really get why this js is being loaded into the cart/checkout/review page for Ubercart. I would think that addthis.js would only be loaded on pages where the Addthis widget actually appears. In any case, thanks for the fix.