4.2にしたのは、リリースされてすぐで、少しトラブルが有ったので、表示は4.1のままでした。中国に行ってからヒマの有る時にバグ潰しをしようと思ってたのですが、甘かった……中国の回線からアップデートしたくなーい。
recently_commented_onがうまく動かない
下のコードはうちの「最近のコメント」表示部分です。赤色の
limit="100"を挿入しないと、「最近のコメント」をうまく表示してくれなくなりました。
<div class="sidebox">
<div class="sideys">Recent Comments</div>
<mt:Entries recently_commented_on="5" sort_order="descend" limit="100">
<div class="sidelin">
<a href="<$MTEntryPermalink$>" title="<$MTEntryTitle$>">
<$MTEntryTitle$></a> <span class="ssday"><$MTEntryDate format="%m.%d"$></span><br />
<MTComments lastn="4">
└ <a href="<$MTEntryPermalink$>#<$MTCommentID$>"><$MTCommentAuthor$><span class="ssday"><$MTCommentDate format="%m.%d"$></span></a><br />
</MTComments>
</div>
</mt:Entries>
</div>
このバグ解決のヒントは、こちらから。
recently_commented_on no longer working?The solution is to add limit="100" to the MTEntries tag, so something like:
<MTEntries recently_commented_on="10" limit="100">
...
</MTEntries>
If 100 isn't enough, try a larger number. No idea why this works or is needed, but it does.
Incidentally, this is only needed if the template is being published statically. If you're publishing the template dynamically, the limit modifer isn't required to get recently_commented_on working.