No custom fields showing / JS error: "TypeError: ticket is undefined"

Home Forums Ticket Products Event Tickets Plus No custom fields showing / JS error: "TypeError: ticket is undefined"

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1109505
    Sean Sullivan
    Participant

    Hello:

    Great to hear that version 4.13 of Event Tickets can now show tickets on custom post types. Obviously a bunch of us have been waiting for this.

    However, I’m running into a new problem: the custom fields (additional fields) are not appearing with the tickets. I’m receiving the following JS error when I click to add a ticket:

    “TypeError: ticket is undefined”

    It’s referencing this file: frontend-ticket-form.js?ver=4.1.3

    And this code:

    my.get_ticket_property = function( ticket_id, property ) {
    // Don't trigger errors if tribe_tickets_stock_data is not available
    if ( "object" !== typeof tribe_tickets_stock_data ) {
    return false;
    }

    var ticket = tribe_tickets_stock_data.tickets[ ticket_id ];

    // If we don't have any data for this ticket we can assume it doesn't use global stock
    if ( "undefined" === tribe_tickets_stock_data.tickets[ ticket_id ] ) {
    return false;
    }

    return ticket[property];
    };

    It appears to be a theme conflict, as reverting to 2016 resolves the issue. I’m in the process of trying to debug the issue now, but hoping someone at Tribe can point me in the right direction.

    #1109511
    Sean Sullivan
    Participant

    Aha, resolved my issue.

    It was the wootickets/tickets.php file in my theme’s /tribe-events folder.

    I had customized the template file, which had been updated.

    Moving the latest file into my /tribe-events folder and re-customizing it solved the issue.

    • This reply was modified 9 years, 11 months ago by Sean Sullivan.
    #1109515
    Brian
    Member

    I am glad to see you were able to figure it out.

    I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘No custom fields showing / JS error: "TypeError: ticket is undefined"’ is closed to new replies.