{"id":1265381,"date":"2017-04-05T13:28:13","date_gmt":"2017-04-05T20:28:13","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/"},"modified":"2017-04-10T12:05:56","modified_gmt":"2017-04-10T19:05:56","slug":"overridden-template-viewmetatext-php-not-called","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/","title":{"rendered":"Overridden Template view\/meta\/text.php not called"},"content":{"rendered":"<p>The template file event-tickets-plus\/src\/views\/meta\/text.php specifies in its header that it may be overridden by placing a copy of the file at [your-theme]\/tribe-events\/meta\/text.php.<\/p>\n<p>We planned to implement default values for custom text fields in woocommerce-based tickets, and fill them with values from the current logged-in user (like first\/last name and email).<\/p>\n<p>We did override the text.php template in our custom theme, but it is not called. We tried to view an event page with one woocommerce-based ticket with a few custom text fields defined. Our custom changes to the text fields are not present on the final page. Making other obvious changes to the html in the template file did not occur on the final event page, and it is evident that the overridden template file is not used by Event Tickets Plus.<\/p>\n<p>When searching your code for the cause of this, we found one instance where the text.php template is loaded in the file Abstract_Field.php on line 222:<\/p>\n<p>include Tribe__Tickets_Plus__Main::instance()-&gt;plugin_path . &#8220;src\/views\/meta\/{$template}&#8221;;<\/p>\n<p>This clearly loads the template file exclusively from your own plugin directory, and not from \/tribe-events\/meta in a theme directory (as the template file header states).<\/p>\n<p>We needed to replace the text.php file in the original tribe-events-plus plugin directory to make our changes visible, but this solution is clearly not acceptable. The changes will be overwritten at next update and we do not want to make changes in the plugin directory.<\/p>\n<p>As usual, we tested this with all other plugins inactive (except woocommerce), but obviously used our own theme to use the theme-overridden files.<\/p>\n<p>How do we solve this issue?<\/p>\n","protected":false},"template":"","class_list":["post-1265381","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>Overridden Template view\/meta\/text.php not called -<\/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\/overridden-template-viewmetatext-php-not-called\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Overridden Template view\/meta\/text.php not called -\" \/>\n<meta property=\"og:description\" content=\"The template file event-tickets-plus\/src\/views\/meta\/text.php specifies in its header that it may be overridden by placing a copy of the file at [your-theme]\/tribe-events\/meta\/text.php. We planned to implement default values for custom text fields in woocommerce-based tickets, and fill them with values from the current logged-in user (like first\/last name and email). We did override the text.php [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-10T19:05:56+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\/overridden-template-viewmetatext-php-not-called\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/\",\"name\":\"Overridden Template view\/meta\/text.php not called -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-04-05T20:28:13+00:00\",\"dateModified\":\"2017-04-10T19:05:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/#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\":\"Overridden Template view\/meta\/text.php not called\"}]},{\"@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":"Overridden Template view\/meta\/text.php not called -","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\/overridden-template-viewmetatext-php-not-called\/","og_locale":"en_US","og_type":"article","og_title":"Overridden Template view\/meta\/text.php not called -","og_description":"The template file event-tickets-plus\/src\/views\/meta\/text.php specifies in its header that it may be overridden by placing a copy of the file at [your-theme]\/tribe-events\/meta\/text.php. We planned to implement default values for custom text fields in woocommerce-based tickets, and fill them with values from the current logged-in user (like first\/last name and email). We did override the text.php [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/","article_modified_time":"2017-04-10T19:05:56+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\/overridden-template-viewmetatext-php-not-called\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/","name":"Overridden Template view\/meta\/text.php not called -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-04-05T20:28:13+00:00","dateModified":"2017-04-10T19:05:56+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/overridden-template-viewmetatext-php-not-called\/#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":"Overridden Template view\/meta\/text.php not called"}]},{"@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\/1265381","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\/1265381\/revisions"}],"predecessor-version":[{"id":1267822,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1265381\/revisions\/1267822"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1265381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}