[ MTmemo ] 2007.09.07 8:32 PM
TypeKey サイン・イン時のscriptエラー
TypeKeyを設定してから、エントリーアーカイブ&コメントプレビュー画面で、TypeKeyにサインインするとscriptエラーマークが出るように。
エラーマークが凄く気になったので、検索してみたところその対処法を見つけたのでメモしておく。
【参考】小粋空間さまのこの記事: Movable Type 3.3 で TypeKey サイン・イン時の JavaScript エラーを解消する
以下必要な部分を抜粋。
このエラーを解消するには、インデックステンプレートSite JavaScript(mt-site.js)の編集画面を開き、下記の青文字部分を追加して再構築します。
<MTElse> // comments are allowed but not required
if (commenter_name) {
hideDocumentElement('name-email');
} else {
showDocumentElement('name-email');
}
</MTElse>
</MTIfRegistrationRequired>
</MTIfRegistrationAllowed>
var mtcmthome;
var mtcmtauth;
if (document.comments_form) {
if (!commenter_name && (document.comments_form.email != undefined) &&
(mtcmtmail = getCookie("mtcmtmail")))
document.comments_form.email.value = mtcmtmail;
if (!commenter_name && (document.comments_form.author != undefined) &&
(mtcmtauth = getCookie("mtcmtauth")))
document.comments_form.author.value = mtcmtauth;
if (document.comments_form.url != undefined &&
(mtcmthome = getCookie("mtcmthome")))
document.comments_form.url.value = mtcmthome;
if (document.comments_form["bakecookie"]) {
if (mtcmtauth || mtcmthome) {
document.comments_form.bakecookie.checked = true;
} else {
document.comments_form.bakecookie.checked = false;
}
}
}
}
これでOK。





