{"id":1109505,"date":"2016-05-02T07:35:21","date_gmt":"2016-05-02T14:35:21","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/"},"modified":"2016-05-02T07:43:21","modified_gmt":"2016-05-02T14:43:21","slug":"no-custom-fields-showing-js-error-typeerror-ticket-is-undefined","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/","title":{"rendered":"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot;"},"content":{"rendered":"<p>Hello:<\/p>\n<p>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.<\/p>\n<p>However, I&#8217;m running into a new problem: the custom fields (additional fields) are not appearing with the tickets. I&#8217;m receiving the following JS error when I click to add a ticket:<\/p>\n<p>&#8220;TypeError: ticket is undefined&#8221; <\/p>\n<p>It&#8217;s referencing this file: frontend-ticket-form.js?ver=4.1.3<\/p>\n<p>And this code:<\/p>\n<p><code>my.get_ticket_property = function( ticket_id, property ) {<br \/>\n\t\t\/\/ Don't trigger errors if tribe_tickets_stock_data is not available<br \/>\n\t\tif ( \"object\" !== typeof tribe_tickets_stock_data ) {<br \/>\n\t\t\treturn false;<br \/>\n\t\t}<\/p>\n<p>\t\tvar ticket = tribe_tickets_stock_data.tickets[ ticket_id ];<\/p>\n<p>\t\t\/\/ If we don't have any data for this ticket we can assume it doesn't use global stock<br \/>\n\t\tif ( \"undefined\" === tribe_tickets_stock_data.tickets[ ticket_id ] ) {<br \/>\n\t\t\treturn false;<br \/>\n\t\t}<\/p>\n<p>\t\treturn ticket[property];<br \/>\n\t};<\/code><\/p>\n<p>It appears to be a theme conflict, as reverting to 2016 resolves the issue. I&#8217;m in the process of trying to debug the issue now, but hoping someone at Tribe can point me in the right direction.<\/p>\n","protected":false},"template":"","class_list":["post-1109505","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot; -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot; -\" \/>\n<meta property=\"og:description\" content=\"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&#8217;m running into a new problem: the custom fields (additional fields) are not appearing with the tickets. I&#8217;m receiving the following JS error when I click [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-05-02T14:43:21+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/\",\"name\":\"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot; -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-05-02T14:35:21+00:00\",\"dateModified\":\"2016-05-02T14:43:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot; -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/","og_locale":"en_US","og_type":"article","og_title":"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot; -","og_description":"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&#8217;m running into a new problem: the custom fields (additional fields) are not appearing with the tickets. I&#8217;m receiving the following JS error when I click [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/","article_modified_time":"2016-05-02T14:43:21+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/","name":"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot; -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-05-02T14:35:21+00:00","dateModified":"2016-05-02T14:43:21+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/no-custom-fields-showing-js-error-typeerror-ticket-is-undefined\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"No custom fields showing \/ JS error: &quot;TypeError: ticket is undefined&quot;"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1109505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1109505\/revisions"}],"predecessor-version":[{"id":1109512,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1109505\/revisions\/1109512"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1109505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}