Recently in Movable Type Category

In developing my extensions, I kept getting the following error:
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)
+++ 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
 );
Issue raised with Six Apart!
http://bugs.movabletype.org/default.asp?85080_etup

About this Archive

This page is an archive of recent entries in the Movable Type category.

Jury Service is the previous category.

Personal is the next category.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en