Mt4.01 RC2 Overloading Core Tags

MT4.01 の RC2 がでたときに一緒に公開されていたネタ。
known issues にあった、mt:tags がオーバーロードできない問題に関して。

この問題は、様々な問題から、そういうデザインである(つまり仕様)ということになったようだ。
一番の問題は、複数のプラグインがオーバーロードしようとしたときに、その競合を解決する術がないからということらしい。

そのため、オーバーロードしたい場合の代替え案が提案されている。
Previously this document listed "unable to overload mt:tags" as a known issue.
We have decided that this is by design.
Listed below is an explanation from Brad Choate as to how plugin developers can work around this design if they feel it is necessary.
まず、この文書は known issue である "mt:tags をオーバーロードできない" ことについて説明している。
我々は、これは仕様であると判断した。
以下にBrad Choateからの彼らはそれが必要だと思うなら、このデザインについてプラグイン制作者はどのように働くことができるかという説明を示す。

MT does have a system that allows for replacing core tags.
The registry does permit a plugin to redeclare a handler,
however,
it currently doesn't handle a situation where multiple plugins are vying for the same tag.
And in this case, MultiBlog is declaring itself the handler for certain core tags: Tags, Entries, Comments, etc.
It does this so it can enforce any blog privacy rules that may exist.
So if you say <MTEntries blog_ids="all">,
MultiBlog will intercept that and pass through the appropriate blog_ids attribute if some of the blogs have opted out of being included in a MultiBlog group.
MT はコアタグの置換を許すシステムを持っている。
その記載は、プラグインにハンドラを再宣言するのを許している。
しかしながら現在のところ、複数のプラグインが同じタグのために争うシチュエーションに対応できない。
そしてこの場合、マルチブログ自身が Tags, Entries, Comments などのようなあるコアタグのハンドラーを宣言する。
存在するかもしれないいくつかのブログのプライバシールールを実施することができる。
なので、もし貴方が、<MTEntries blog_ids="all">というなら、
もしブログのうちのいくつかがマルチブロググループに含まれるものに加わらないことにするなら、
マルチブログはそれを傍受し、特定の blog_ids アトリビュートを通り過ぎるだろう。

For example, say you want to override the 'Core' Tags handler,
it is advised you replace the core handler for that tags as opposed to amending with your own behavior.
So, I would recommend those plugins interact with the Core component directly.
For example:
例として
'Core' Tags ハンドラーをオーバーライドしたい場合、
貴方自身の振るまいで改善することに対立するものとして、そのタグのコアハンドラを置き換える。
だから、それらのプラグインはCore コンポーネントダイレクトリと相互に作用することを推奨する。
例えば、以下の通り。
sub init {
    my $p = shift;
    $p->SUPER::init(@_);
    my $core = MT->component('core');
    my $r = $core->registry("tags", "block");
    $r->{Tags} = \&hose;
}
By doing this, you are replacing an element in MT's core registry.
This insures that any plugin that extends that handler will call yours instead.
So this will still wind up calling MultiBlog to enforce privacy,
but MultiBlog will then call your handler to do the real work.
これによって、MT のコアレジストリにエレメントを置き換えている。
これは、そのハンドラを拡張するすべてのプラグインが貴方のプラグインの代わりに呼ばれるのを保証する。
だから、これは、プライバシーを実施するためにマルチブログをコールするのを終わりにするが、
マルチブログはその時、本当の動作を行うために貴方のハンドラを呼ぶだろう



ということで、MT4.01については、known issuesがあと1つになった。
残っている問題は、アップグレード時に問題が生じることがあるというものらしいが、情報が少なくて困っている模様。
問題というのは、アップグレードプロセスがランダムに2度実行されるということらしい。
症例がきっと少ないのだろう。

特に報告がなければ、自然解決ということで4.01がリリースされるということもあり得るのかな。
まぁしばらく様子見ってことになるんだろうけど、これまでのペースから今週中にも次がリリースされる可能性もあるかも。
それが正式リリースということもありえるだろうし、RC3ということもありえるだろうし。

他のバグ次第でもあるんだろうけどね。
カテゴリ:

関連する記事

この記事に関連する記事は、6 件です。

トラックバック

このブログ記事に対するトラックバックURL
http://fakelife.info/mt/system/mt-tb.cgi/32

コメントする


画像の中に見える文字を入力してください。