default userpic

MT's add_trigger() routine prevents installation (deprecated)

Vote 0 Votes

Greetings,
Any attempt to install MT-4.33 fails with the following error:

Got an error: mutiple trigger registration in one add_trigger() call is deprecated.

Initial investigation indicates the following MT modules are likely candidates:

lib/MT/Summary.pm
lib/MT/Tag.pm
lib/MT/Scorable.pm
lib/MT/Object.pm
lib/MT/Entry.pm
lib/MT/Template.pm
lib/MT/Summary/Triggers.pm

As a result, MT can not be installed.

Thank you for all your time and consideration in this matter.

--Chris

Reported on Movable Type 4.3

6 Replies

| Add a Reply
  • Further investigation reveals that MT is not compatible with
    modern Perl, or OS versions. Reason being; MT relies on unreliable
    routines that have since been discovered, and removed. In this case, the
    module Trigger.pm. Modern systems use versions ~0.13. But MT relies on 0.10.
    The call that results in failure in Trigger.pm (0.13) is:


    sub add_trigger {
    my $proto = shift;

    my $triggers = __fetch_triggers($proto);

    my %params = @_;
    my @values = values %params;
    if (@_ > 2 && (grep { ref && ref eq 'CODE' } @values) == @values) {
    Carp::croak "mutiple trigger registration in one add_trigger() call is deprecated.";
    }

    As a result, until MT dev's upgrade their system to support modern
    Perl, and Operating Systems. MT installations will fail.

    Thank you for all your time and consideration in this matter.

    --Chris

  • For those interested in Class::Trigger.

    You can perform the following:

    perldoc Class::Trigger

    or view the documentation online via:
    Class::Trigger

    --Chris

  • Further investigation reveals that MT is not compatible with modern Perl

    That would have to be a 4.33-specific bug since I've run MT 5 beta releases on Perl 5.11...

  • Greetings Mike T, and thank you for your response.
    Sorry, I should have noted the MT version (4.33). I was so involved
    with trying to find the problem, in hopes of creating a solution. I'm
    afraid I overlooked that significant detail. :(

    I don't suppose anyone involved in MT development has any intention of
    changing the add_trigger() routine(s)?

    Or is it enough to replace the 4.33 files:
    lib/MT/Summary.pm
    lib/MT/Tag.pm
    lib/MT/Scorable.pm
    lib/MT/Object.pm
    lib/MT/Entry.pm
    lib/MT/Template.pm
    lib/MT/Summary/Triggers.pm
    with the 5.x versions?

    Thanks again for taking the time to respond.

    --Chris

  • OK replacing any of the 4.33 files listed above with the 5.x counterparts
    solves nothing. However, it seems to appear that lib/MT/Entry.pm might
    be the culprit. However, no leads yet.

    Thank you for all your time and consideration in this matter.

    --Chris

  • WOOHOO!
    I was right. lib/MT/Entry.pm _was_ the culprit!
    For those who choose to use their system (modern) modules;
    you'll find the solution on line #314 of lib/MT/Entry.pm
    comment lines #314 - #317
    then add just below them:


    MT::Placement->add_trigger(
    post_save => \&flush_category_cache
    );
    MT::Placement->add_trigger(
    post_remove => \&flush_category_cache
    );

    Barring any other version issues with your system modules, you should
    now have a working MT-4.33 installer.

    Best wishes.

    --Chris

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012