Updated: Comment #10
Problem/Motivation
Just now I guess AddThis had their server go down or something, because all pages with AddThis on them are simply showing a white page and timing out. The bar at the bottom says "waiting on s7.addthis.com"
I know you don't control their servers, but shouldn't this script only be loading after the rest of the page? Correct me if I'm wrong but isn't this just a matter of needing to wrap the call in a a document.readyState?
I am using development because I found the other release to be missing a bug fix that I was encountering. But this bug is worse.
This kind of thing can't happen on a production site. Any way around it for the time being or will I just have to find another route to social media?
Thanks much in advance. Great module but hopefully this can be resolved.
Proposed resolution
Please review this issue. It should fix this problem too.
#1919156: Addthis analytics not working
Remaining tasks
There is something wrong with the asynchronous loading script. This should be fixed. (See comment #5) More information is needed for this and input on the current approach of async loading is welcome.
| Comment | File | Size | Author |
|---|
Comments
Comment #1
matglas86 commented1. Could you please test this patch and see if this fixes your problem. I moved the loading of the javascript to the footer for non async setting.
2. Please check in /admin/config/user-interface/addthis/advanced in the section "Advanced settings" if "Load Widget javascript Asynchronous" is check. If not please test that too.
If this works for you please let me know so I can commit this patch.
Comment #3
matglas86 commentedI don't know why but my patches are removed. If someone did it please let me know why.
== Edit ==
Patch is wrong. Contains stuff from a different issue.
Comment #4
matglas86 commentedI committed the wrong patch. This has changes from a different issue also :) Here is the correct patch.
Comment #5
moonray commentedIt looks like some form of asynchronous loading is in 7.x-4.x-dev. It fails.
When I turn the asynchronous flag off, the js loads for me. There's something wonky with the anychronous loading script.
Comment #6
matglas86 commentedSo it needs work
Comment #7
areke commentedComment #8
matglas86 commented@moonray can you provide more information on the issue because when I test this it work correctly.
As I wrote it works with me but when I wrote this down I thought that it might happened differently on browsers or depending on the fired events. We could through out the jquery.getScript on and add it by default so addthis executes the async by itself.
At the time of building this I thought that it might be good make Drupal responsible of doing the async stuff by loading the script after the page was loaded.
Any feedback on this approach is welcome.
Comment #9
matglas86 commentedI think I fixed this issue now with the patch in this issue. Its related.
https://drupal.org/node/1919156
Comment #10
matglas86 commentedReview the issue I mentioned in the comment before.
Comment #11
matglas86 commentedComment #12
matglas86 commentedIf this issue does not receive feedback based on the proposed solution I'm going to close it next week. If you problem is not fixed with the latest development release please open a new issue.
Comment #13
matglas86 commentedProbably fixed with #1524720: Unnecessary load of AddThis libraries on every page, even in admin pages. Closing it. If any issues arise please reopen this issue and explain the problem in more detail.