Needs review
Project:
TweetMeme
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2009 at 20:23 UTC
Updated:
13 Oct 2011 at 10:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
steven jones commentedWe are seeing this exact issue, but when previewing a view. The JS that tweetmeme provide doesn't seem compatible with drupal AHAH stuff.
Comment #2
steven jones commentedSo it turns out that the js that you have to include from tweetmeme:
http://tweetmeme.com/i/scripts/button.js
Includes a nasty
document.write()causing the page to be replaced with just the tweetmeme button when run from any other scope than the initial page load.Our (not ideal) solution is to have a local copy of the tweetmeme script and tweak it to use jQuery.
So, you'll want to override the
theme_tweetmeme_button()with this:And then copy the button.js from the tweetmeme server to your local server, and change the document.write line (might want to JS beautify the code so you can see what you're doing) to this:
$(tweetmeme_element_id).append('<iframe src="' + src + '" height="' + h + '" width="' + w + '" frameborder="0" scrolling="no"></iframe>');Comment #3
robloachI brought this up to them a while ago and they suggested using the iFrame directly:
http://help.tweetmeme.com/forum/topic/64#post-240
I think what you suggest is a better solution/hack though. It also means we could stick the JavaScript at the bottom of the page.
Comment #4
mrfelton commentedI have this problem too when trying to update, preview, or save a view - page refreshes to completely whitescreen. I don't see the tweetmeme image, but I do see that it's trying to contact tweetmeme in the browser's status bar. I also seem to have the same or similar problem with the addthis module.
Where possible, remote resources should be stored locally - this is much better from a performance point of view.
Comment #5
mrfelton commentedAttached is a patch that incorporates the above fix AND includes the js file in the module directory, so no need to download it and put it in your theme directory. Not sure of the licence of the tweetmeme script though, so that may be a no go.
Comment #6
mrfelton commentedOops. Bad patch - IGNORE THE PATCH ABOVE. forgot to comment out the original code! Use this one instead.
Comment #7
mrfelton commentedDamn it. Really sorry for the multiple posts... forgot to alter the js that time!
Comment #8
DrupalSza commentedI'm facing this issue as well.
Using TweetMeme w/calendar views causes a white screen, or when creating a view w/a node type that uses tweetmeme also causes a white screen.
Does this patch still work?
If so - how would I install it?
I have never used a patch before.
Thank you.
Comment #9
kmontySub. I'm having this issue and would love to test but this patch is old and don't have time to update it (deadline Sunday!). If someone redoes this patch based on dev, I'll happy report back.
Comment #10
robloachI like this, but am concerned what would happen if they change their service or their JavaScript changes. It's nice to be able to aggregate the JavaScript, but I'm not sure if we want to assume their JavaScript will never change.
There's also #751374: Use TweetMeme API instead of JavaScript which might be a better solution.
Comment #11
mrfelton commentedI know this is not the preferred solution, but we needed an updated patch to apply to 1.3 to get things working, and we needed it now, so it was quick and easy for us to just update this patch./ Revised version attached.