Support » Plugin: Event Tickets » Fatal error introduced in 4.10.0.1

  • Title. Updating this plugin to the latest version has completely taken down my entire website (front-end and admin dashboard).

    Here is what I’m seeing in my PHP error log:

    [13-Feb-2019 02:32:43 UTC] PHP Fatal error: Uncaught RuntimeException: Error while making 'tickets-plus.commerce.woo': 'tickets-plus.commerce.woo' is not a bound alias or an existing class. in /public/wp-content/plugins/event-tickets/common/vendor/lucatume/di52/src/tad/DI52/Container.php:348

    Let me know if you need any further information from me.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author András Guseo

    (@aguseo)

    Hi @pixelbrad

    Thanks for reporting this. We did have an issue with Event Tickets Plus, for which we pushed another hotfix, 4.10.0.2
    Please update and check if that helps.

    Cheers,
    Andras

    Thread Starter pixelbrad

    (@pixelbrad)

    Hi Andras,

    Event Tickets is actually fine at version 4.10.0.1. It’s when I update Event Tickets Plus from version 4.8.3 to 4.10.0.2 that I encounter a fatal error. Doesn’t matter if I try browsing front-end or of I browse through the admin area. Error 500 on all pages.

    I have the same problem. Any updates?

    Having the same issue as well. Any progress on figuring this out?

    I figured out my issue. It was some code that was apparently no longer valid with settings that changed within the events calendar plugin itself. I removed that old code and updated the settings and it works.

    Here is the code I was using that I removed:

    remove_action( ‘tribe_events_single_event_after_the_meta’, array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), ‘front_end_tickets_form’ ), 5 );
    // Place the form in the new location (after the content).
    add_action( ‘tribe_events_single_event_before_the_content’, array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), ‘front_end_tickets_form’ ), 5 );

    Thread Starter pixelbrad

    (@pixelbrad)

    @aguseo Care to chime in?

    Yeah, 4.10.0.2 definitely does not fix this fatal error.

    Argh. Ok, @fluiditystudio ‘s tip helped, I was using this function provided by Tribe.

    function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
        if ( ! class_exists( 'Tribe__Tickets__Tickets') ) return;
        $etp_classes = array(
            'Easy_Digital_Downloads' =>     'Tribe__Tickets_Plus__Commerce__EDD__Main',
            'ShoppVersion' =>               'Tribe__Tickets_Plus__Commerce__Shopp__Main',
            'WP_eCommerce' =>               'Tribe__Tickets_Plus__Commerce__WPEC__Main',
            'Woocommerce' =>                'Tribe__Tickets_Plus__Commerce__WooCommerce__Main',
            'Tribe__Tickets__Tickets' =>    'Tribe__Tickets__RSVP',
        );
        foreach ( $etp_classes as  $ecommerce_class => $ticket_class) {
            if ( ! class_exists( $ecommerce_class ) || ! class_exists( $ticket_class ) ) continue;
            $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' );
            if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) {
                remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 );
                add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );
            }
        }
    }
    
    tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_before_the_content' );

    Commenting out the hook ‘fixes’ the issue, but of course it’s not a fix. So it seems like the ‘tribe_events_single_event_after_the_meta’ filter has been removed? Or is it ‘tribe_events_single_event_before_the_content’?

    • This reply was modified 2 years, 2 months ago by . Reason: More information
    • This reply was modified 2 years, 2 months ago by .
    Plugin Author András Guseo

    (@aguseo)

    I reached out to our developers. Will get back to you when I have something.
    We discovered an issue if you also have Image Widget Plus installed. Released a hotfix.

    Might also be worth going through our conflict testing guide to see if it’s not some other 3rd party plugin interfering.
    https://support.theeventscalendar.com/303643-Testing-for-conflicts#look-for-solution

    Have a happy weekend.
    A.

    Hi,

    This issue seems to be a lack of bound class when trying to get an instance with Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance().

    Altering lines 234-237 of event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php to read:

    
    tribe_singleton( 'tickets-plus.commerce.woo', 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' );
    return tribe( 'tickets-plus.commerce.woo' );
    

    …fixes this error. But this feels very dirty, and not at all like an actual fix. It may cause some issues with things as it’s a non-standard way of instantiating the main class for future use.

    I need this as I have repositioned the tickets form on my event pages, which cases this error when trying to use:

    
    $form_display_function = array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' );
    add_action( 'single_ticket_form_location', $form_display_function, 5 );
    

    with a single_ticket_form_location hook on my custom single event page.

    I hope this might help someone or be a pointer to the devs, at least.

    I have a site going live on Monday so this is a pretty big one. Please fix bugs!

    Regards,
    Not Having A Happy Weekend

    Plugin Author András Guseo

    (@aguseo)

    @johnny_n can you link me to the source of that code Tribe shared with you?

    Plugin Author Zach Tirrell

    (@zbtirrell)

    If you are trying to relocate the tickets form, is it possible you can use this setting instead of custom code?

    https://support.theeventscalendar.com/166718-Moving-RSVP-and-Ticket-Forms

    @aguseo It looks like the code I used was in the themer’s guide at one point — that is specifically mentioned in this post:

    “We used the function provided in your themer’s guide to move the ticket form…”

    https://theeventscalendar.com/support/forums/topic/moving-ticket-purchase-form-in-genesis-how-to-properly-apply-remove_action/

    The same code is referenced here:

    https://theeventscalendar.com/support/forums/topic/moving-the-ticket-field-to-top-of-page/

    @zbtirrell Clearly this is legacy code – on this particular site it probably does date back to 2015/2016 or so. Now that there is an option in the admin for this, I will use that and see how that goes.

    Thank you!

    john.

    • This reply was modified 2 years, 2 months ago by .

    also having the same problem with v 4.10.0.2

    Fatal error: Uncaught RuntimeException: Error while making ‘tickets-plus.commerce.woo’: ‘tickets-plus.commerce.woo’ is not a bound alias or an existing class

    Deanobyte

    (@deanobyte)

    weighing in for anyone finding this via Google.

    Uncaught exception ‘RuntimeException’ with message Error while making ‘tickets-plus.commerce.woo’: ‘tickets-plus.commerce.woo’ is not a bound alias or an existing class.

    You don’t need to mess with the plugin you just need to use the classes at the right time.

    ‘tickets-plus.commerce.woo’ gets registered via this class (Tribe__Tickets_Plus__Service_Provider) which gets called via the init WP action hook. Check the register method is running BEFORE any implementation of your own.

    This register will not run until the ‘init’ hook with a priority of 5. Any custom code needs to run after this.

    For context I have the following below to remove an action inside an ‘init’ callback.

    remove_action('woocommerce_order_action_resend_tickets_email', array(\Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'add_resend_tickets_action'));

    I came across this from updating from an older version. My timing was just a little off stopping it from working.

    Dean

    Can anyone who have commented above confirm that this error no longer occurs in most recent versions of the plugin? ie. anything after v 4.10.0.2 ??

    We are seeing this issue and before we upgrade we want to be sure this issue has been resolved – can anyone please comment and advise?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Fatal error introduced in 4.10.0.1’ is closed to new replies.