In developing my extensions, I kept getting the following error:
The code in MT/Entry.pm is incompatible with Class::Trigger 0.12, which comes with recent versions of perl. If you have set up your paths incorrectly (like $ENV{'MT_HOME'}) or you have plugins that require a version later than the Class::Trigger 0.10 that comes with Movable Type, you will encounter this problem. In my case, I'm linking in external libraries that use the later version.
To fix this, I'm using this patch:
http://bugs.movabletype.org/default.asp?85080_etup
Got an error: mutiple trigger registration in one add_trigger() call is deprecated. at lib/MT/Entry.pm line 282
Compilation failed in require at lib/MT/Compat/v3.pm line 12.
BEGIN failed--compilation aborted at lib/MT/Compat/v3.pm line 12.
Compilation failed in require at lib/MT.pm line 1210.
The code in MT/Entry.pm is incompatible with Class::Trigger 0.12, which comes with recent versions of perl. If you have set up your paths incorrectly (like $ENV{'MT_HOME'}) or you have plugins that require a version later than the Class::Trigger 0.10 that comes with Movable Type, you will encounter this problem. In my case, I'm linking in external libraries that use the later version.
To fix this, I'm using this patch:
--- lib/MT/Entry.pm (revision 3196)Issue raised with Six Apart!
+++ lib/MT/Entry.pm (working copy)
@@ -279,8 +279,12 @@
);
}
+# Must use separate statements from Class::Trigger 0.12
MT::Placement->add_trigger(
post_save => \&flush_category_cache,
+);
+
+MT::Placement->add_trigger(
post_remove => \&flush_category_cache
);
http://bugs.movabletype.org/default.asp?85080_etup

Leave a comment