Moving Events Ticket form crashes entire website

Home Forums Ticket Products Event Tickets Plus Moving Events Ticket form crashes entire website

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1082053
    Patrick Moore
    Participant

    I recently tried to use the code to move the Events Tickets form to above the content (or anywhere, really) using the code:

    /*
     * Moves the front-end ticket purchase form, accepts WP action/hook and optional hook priority
     *
     * @param $ticket_location_action WP Action/hook to display the ticket form at
     * @param $ticket_location_priority Priority for the WP Action
     */
    function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
        $etp_classes = array(
            'Tribe__Tickets_Plus__Commerce__EDD__Main',
        //    'Tribe__Tickets_Plus__Commerce__Shopp__Main', // As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active
            'Tribe__Tickets_Plus__Commerce__WPEC__Main',
            'Tribe__Tickets_Plus__Commerce__WooCommerce__Main'
        );
        foreach ( $etp_classes as $ticket_class ) {
            if ( ! class_exists( $ticket_class ) ) break;
            $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 );
            }
        }
    }
    
    /*
     * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING BY REMOVING THE //
     */
    
    /*
     * Uncomment to Move Ticket Form Below Related Events
     */
    //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_meta', 20 );
    
    /*
     * Uncomment to Move Ticket Form Below the Event Description
     */
    //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_content', 5 );
    tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_before_the_meta’ );
    
    /*
     * Uncomment to Move Ticket Form Above the Event Description
     */
    //tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_before_the_content' );

    This has the unfortunate effect of giving the page a white screen of death.

    If I comment out all of the calls to the function, the site is fine but there is no movement of the ticket form (obviously). As soon as I uncomment ANY of the calls to the function, it causes the page to crash. I have tried disabling all of my plugins except for Woocommerce, TEC, TEC PRO, ET & ET Plus, but still get a crash on the page.

    Any help?

    Using:
    Avada Theme 3.9.3
    Woocommerce 2.5.2
    The Events Calendar 4.0.6
    The Events Calendar PRO 4.0.6
    Event Tickets 4.0.5
    Event Tickets Plus 4.0.5

    #1082247
    Manpreet
    Participant

    I’d also like to know how to move the ticket purchase section above the “Details” and “Venue” section.

    Thanks in advance!

    #1082503
    Gabe Frederito
    Participant

    I am also having this issue after just installing the plugin.

    Turning on wp debug give this error to the specific line below.

    Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ‘)’ in /home/goldhill/public_html/wp/wp-content/themes/Avada-Child-Theme/functions.php on line 32

    When i edit the functions.php in dreamweaver is says there is a syntax error or this line of the code given

    $form_display_function = array( $ticket_class::get_instance(), ‘front_end_tickets_form’ );

    #1082558
    Nico
    Member

    Hi Folks,

    Thank you all for reaching to us and sorry to hear about this issue. I’ll help you out getting this right…


    @slightlynervous
    , I just tested the snippet in my local install with the same plugin versions you described, and it’s working fine on my end. Can you please try pasting the snippet from this URL: https://goo.gl/QQpgUS .I see there are a couple of ‘missmatching’ quotes in the one you shared.

    If that doesn’t work, Can you try to switch to default theme and move the snippet to the default theme functions.php file? Also can you look into the PHP error log to see if some error comes up in there?

    @ Manpreet, the snippet and instructions for this are in this article: Moving the Tickets Plus form. Give that a try!


    @inteloc
    , from what I see that line seems correct, maybe the quotes are generating the error in there as well. Please try re-pasting the snippet from this URL: https://goo.gl/QQpgUS

    Please let me know if re-pasting the snippet solves the issue,
    Have a great weekend,
    Nico

    #1082598
    Patrick Moore
    Participant

    Well, I deleted the plugin and then re-installed it to see if that was the problem. Now I can only add RSVP tickets and not paid ones. The settings section tells me my license code is fine and so does the website.

    I gotta say, no offence, but so far I am not impressed with this plugin. You can’t move the form without adding code to your functions.php file and it obviously has problems in the licensing section.

    For $89 for ONE YEAR, I’m not really getting anything. So far, I am $89 US lighter and I don’t have a plugin that works.

    #1082609
    Patrick Moore
    Participant

    Notice: Use of undefined constant ‘Tribe__Tickets_Plus__Commerce__EDD__Main’ – assumed ‘‘Tribe__Tickets_Plus__Commerce__EDD__Main’’ in /home/ontario4/public_html/wp-content/themes/Avada/functions.php on line 589

    Notice: Use of undefined constant ‘Tribe__Tickets_Plus__Commerce__WPEC__Main’ – assumed ‘‘Tribe__Tickets_Plus__Commerce__WPEC__Main’’ in /home/ontario4/public_html/wp-content/themes/Avada/functions.php on line 591

    Notice: Use of undefined constant ‘Tribe__Tickets_Plus__Commerce__WooCommerce__Main’ – assumed ‘‘Tribe__Tickets_Plus__Commerce__WooCommerce__Main’’ in /home/ontario4/public_html/wp-content/themes/Avada/functions.php on line 593

    #1082726
    Gabe Frederito
    Participant

    Nico,

    Thanks for assisting with this. I completely deleted all other content in the functions.php file in the child theme folder and still get the same error. Using avada theme. Keeps pointing this line as having syntax issues.

    $form_display_function = array( $ticket_class::get_instance(), ‘front_end_tickets_form’ );

    This is the error that shows on the site.
    Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting ‘)’ in /home/goldhill/public_html/wp/wp-content/themes/Avada-Child-Theme/functions.php on line 18

    Takes the whole site down with it.

    Switched to default theme and it seems to work but does not move up the ticket.

    Alternatively can I just remove the sidebar and have everything show inline with no sidebar.

    Thanks
    gabe

    #1083946
    Nico
    Member

    Thanks for following up, and sorry to hear this is still an issue!

    I’ve made a simple version of the snippet that just works for WooCommerce, as that’s the plugin @slightlynervous (who is the original poster) is using. Please give the snippet a new try and let me know:

    https://gist.github.com/niconerd/bc80573ef0f5af2e6cf2

    Be sure all plugins (The Events Calendar + Event Tickets + Event Tickets Plus + WooCommerce) are active! If this doesn’t work with your theme (or child theme), please try switching to default theme and adding it to the functions.php file.

    Gabe, If you do not use WooCommerce please let me know and indicate which platform you use so I can create a version of the snippet for you.

    I gotta say, no offence, but so far I am not impressed with this plugin. You can’t move the form without adding code to your functions.php file and it obviously has problems in the licensing section…. For $89 for ONE YEAR, I’m not really getting anything. So far, I am $89 US lighter and I don’t have a plugin that works.


    @slightlynervous
    , sorry to hear you are not satisfied with the product so far. This same snippet worked for most of users in the past and it’s a bit strange that is not working for you folks here. I’m doing my best to help you here. Regarding the licenses issues, Did you open up a thread for that issue? From the errors you show seems like Event Ticket Plus is not active.

    Please let me know if this works,
    Best,
    Nico

    #1083988
    Cecilia
    Participant

    I’m also having this problem: http://iangel.org

    Our website is down after attempting to move the ticket section up to the top of the page, as per the instructions on this site.

    I no longer have access to the backend or front end of our website. All attempts to reach our server cause the same fatal error code.

    Fatal error: Call to undefined function tribe_etp_move_tickets_purchase_form() in /fuggle/home/iangel/www.iangel.org/docs/wp-content/themes/spacious-pro/functions.php on line 33

    Suggestions??

    • This reply was modified 10 years, 1 month ago by Cecilia.
    #1084763
    Patrick Moore
    Participant

    @slightlynervous, sorry to hear you are not satisfied with the product so far. This same snippet worked for most of users in the past and it’s a bit strange that is not working for you folks here. I’m doing my best to help you here. Regarding the licenses issues, Did you open up a thread for that issue? From the errors you show seems like Event Ticket Plus is not active.

    Nope, I was just having a bad day and took it out on you. My apologies – I hate acting like an ass.

    Unfortunately, the code snippet doesn’t work.

    #1085115
    Tanya Kieneker
    Participant

    Ditto to everything above. Only difference is that I’m not using the pro version of the tickets plugin, but am using The Events Calendar Pro. Not sure if the snippet is different, but this takes down my site too. I use Avada, so my form is in the sidebar, but would move prefer it to be in the main section of the description.

    #1087447
    Nico
    Member

    Hey folks here,

    Sorry for the delay in my reply almost all of the team was out last week and part of this one as well (including myself), so I’m still catching up with my threads!

    @Cecilia, strange to hear the error makes reference to the function not being defined which is in fact done in the snippet. Have you modified the snippet in any way?

    @Tanya, there’s a different way of moving the RSVP (free tickets plugin), check this reply on a previous thread: https://theeventscalendar.com/support/forums/topic/how-to-move-the-rsvp-form/#dl_post-1034855 – I the suggested doesn’t work for you please open up a new thread. When creating the new thread please be sure to Test for conflicts and include your system information, that will surely help getting a better reply.


    @slightlynervous
    , all good! We all have bad days… and sorry to hear this is still an issue. Can you follow-up with full system information in a private reply please? Various of my team mates tried to reproduce this in different set-ups but the snippet is working for all of us. Hope we can nail it soon!

    Thanks,
    Nico

    #1094104
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Moving Events Ticket form crashes entire website’ is closed to new replies.