Moving the Tickets Plus form 'code' crashes the site

Home Forums Ticket Products Event Tickets Plus Moving the Tickets Plus form 'code' crashes the site

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1061434
    Chris
    Participant

    I’ve been trying to move the tickets above the event details. All the forum posts direct to this page https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/

    However when applying the below code, my website crashes – the whole site is white. Which I resolve by editing the Function.php file back to the way it was.

    /*
    * Uncomment to Move Ticket Form Below the Event Description
    */
    //tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_after_the_content’, 5 );

    I’m using the Salient Child Theme.

    Also, strangely the code to move the RSVP below DOES work.

    /**
    * Move RSVP Tickets form in events template
    */
    if (class_exists(‘Tribe__Tickets__RSVP’)) {
    remove_action( ‘tribe_events_single_event_after_the_meta’, array( Tribe__Tickets__RSVP::get_instance(), ‘front_end_tickets_form’ ), 5 );
    add_action( ‘tribe_events_single_event_before_the_meta’, array( Tribe__Tickets__RSVP::get_instance(), ‘front_end_tickets_form’ ), 5 );
    }

    The page I’m currently working on is http://lunapark.com.au/event/matt-harveys-just-for-funny-melbourne-comedy-festival/2016-02-25/

    But it is relevant for all the events here http://lunapark.com.au/events/

    I’m a PHP coder but can work most things out.

    cheers
    -Colby

    #1061543
    George
    Participant

    Hi @Colby,

    We unfortunately cannot provide any support for customizations, or problems that arise from making customizations πŸ™

    Please see the “Product Support” section of this page for more information β†’ http://theeventscalendar.com/terms


    Now, despite the notice I wrote above, if you can copy and paste your entire, un-edited functions.php file into a Gist at http://gist.github.com, and then share a link to that Gist, I will gladly take a look and try to spot the problem!

    πŸ™‚

    Cheers,
    George

    #1062780
    Chris
    Participant

    This is the child theme that I am using
    https://gist.github.com/anonymous/6ff4af49dee83bc3f177

    This is the parent theme’s function.php
    https://gist.github.com/anonymous/26919729a33e9d631f16

    #1063253
    George
    Participant

    Hi Colby,

    Thanks for sharing this.

    1. You have the same code to move the form in your child-theme functions.php twice. Why is this? Does anything improve if you remove the duplicate block of code?

    2. If “No” for #1, then what if you remove the code from your child-theme functions.php and place it back in your parent theme’s functions.php file?

    3. If “no” for #2, then what if you remove the code from your parent-theme, place it back into your child theme, and then head to your site’s wp-config.php file and change this line of code:

    define('WP_DEBUG', false);

    to this:

    define('WP_DEBUG', true);

    That will display PHP errors if any exist, which might be quite useful here. Once you’ve made this change, take another look at your site. Instead of just a blank white screen, there should be error text. If so, please copy and paste the entire text of the error here on this thread.

    4. If the steps in #3 here do not show error text, then do what you did in step #2 here – take the code out of the child-theme and put it into the parent theme, and then see if error text shows on the site again instead of a blank white screen.

    This process here is a thorough one that will hopefully reveal the problem. I could not spot the issue from my overview of the files you shared.

    Let us know what you find!

    Thank you,
    George

    #1066079
    Chris
    Participant

    I have fixed it, apparently I needed to use this whole code featured on this link.

    https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/

    Not just the selection I grabbed.

    #1066088
    George
    Participant

    Awesome! Thank you for the update Colby. Glad you’ve got this fixed.

    I will close up this thread for now, but please open a new thread any time if other questions arise.

    Best of luck with your project!
    George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Moving the Tickets Plus form 'code' crashes the site’ is closed to new replies.