TwitterWidgetをSilverStripeに統合しようとしています。
それは私が使用しようとしているプラグインです: https ://twitter.com/about/resources/widgets/widget_profile
このコードを単純な*.htmlファイルに入れると、ウィジェットが機能します。残念ながら、*。ssファイルで使用しようとするとエラーが発生します。
エラーが発生する場所を見つけるためにソースコードをダウンロードしました。数時間後、私はかなり紛らわしい何かを見つけました:
これは、エラーが発生するコードの一部です。
document.write('<div class="twtr-widget" id="'+this.id+'"></div>')
FireBug:
uncaught exception: [Exception... "An attempt was made to use an object that is not, or is no longer, usable" code: "11" nsresult: "0x8053000b (NS_ERROR_DOM_INVALID_STATE_ERR)" location: "http://www.domain.com/mysite/javascript/widget.js?m=1321187964 Line: 257"]
LeftAn...8532904 (Zeile 883)
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
数回更新した後、FireBugは次のように報告することがあります。
An attempt was made to use an object that is not, or is no longer, usable
[Bei diesem Fehler anhalten] document.write('<div class="twtr-widget" id="'+this.id+'"></div>')
Google Chrome JavaScriptデバッガー:
Uncaught TypeError: Object #<Document> has no method 'write' //widget.js:257
TWTR.Widget.init //widget.js:257
TWTR.Widget //widget.js:211
(anonymous function) //?stage=Stage&flush=1:117
f.extend._Deferred.e.resolveWith //jquery-1.6.4.min.js:2
e.extend.ready //jquery-1.6.4.min.js:2
c.addEventListener.C //jquery-1.6.4.min.js:2