{"id":1129073,"date":"2016-06-19T16:45:26","date_gmt":"2016-06-19T23:45:26","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/"},"modified":"2016-06-19T16:45:26","modified_gmt":"2016-06-19T23:45:26","slug":"organizer-required-filter-not-working","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/","title":{"rendered":"Organizer required filter not working"},"content":{"rendered":"<p>I&#8217;m experiencing the same problem described above. After the upgrade to Community Events 4.2 the required filter that I&#8217;ve been using in my functions file stopped working.<\/p>\n<p>Here&#8217;s the filter I&#8217;ve been using:<\/p>\n<pre><code>\/*The Events Calendar Community Events Required Fields *\/\n\nadd_filter( &#039;tribe_events_community_required_fields&#039;, &#039;my_community_required_fields&#039;, 10, 1 );\n \nfunction my_community_required_fields( $fields ) {\n    $fields = array(\n        &#039;post_title&#039;,\n        &#039;post_content&#039;,\n        &#039;EventStartDate&#039;,\n        &#039;venue&#039;,\n        &#039;organizer&#039;,\n    );\n \n    \/\/ Requiring the organizer email (or other &quot;square bracketed&quot;\n    \/\/ fields) can&#039;t be done using the above approach, but we can\n    \/\/ simply test within the $_POST superglobal directly.\n    \/\/\n    \/\/ If a field hasn&#039;t been populated then we simply add a requirement\n    \/\/ using a field name we know doesn&#039;t exist, but can be used to form\n    \/\/ a meaningful error message (if the org email is missing the user\n    \/\/ will see &quot;Organizer Email is required&quot;).\n    \/\/\n    \/\/ You could take this a step further and additionally validate the\n    \/\/ email field to ensure it looks like a valid email address and\n    \/\/ provide an alternative error using the same approach.\n    if ( empty( $_POST[&#039;organizer&#039;][&#039;Email&#039;] ) )\n        $fields[] = &#039;Organizer Email&#039;;\n \n    return $fields;\n}<\/code><\/pre>\n<p>It&#8217;s been working flawlessly before upgrading to 4.2<\/p>\n","protected":false},"template":"","class_list":["post-1129073","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>Organizer required filter not working -<\/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\/organizer-required-filter-not-working\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Organizer required filter not working -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m experiencing the same problem described above. After the upgrade to Community Events 4.2 the required filter that I&#8217;ve been using in my functions file stopped working. Here&#8217;s the filter I&#8217;ve been using: \/*The Events Calendar Community Events Required Fields *\/ add_filter( &#039;tribe_events_community_required_fields&#039;, &#039;my_community_required_fields&#039;, 10, 1 ); function my_community_required_fields( $fields ) { $fields = array( [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/\" \/>\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\/organizer-required-filter-not-working\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/\",\"name\":\"Organizer required filter not working -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-06-19T23:45:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/#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\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Community Events\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Organizer required filter not working\"}]},{\"@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":"Organizer required filter not working -","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\/organizer-required-filter-not-working\/","og_locale":"en_US","og_type":"article","og_title":"Organizer required filter not working -","og_description":"I&#8217;m experiencing the same problem described above. After the upgrade to Community Events 4.2 the required filter that I&#8217;ve been using in my functions file stopped working. Here&#8217;s the filter I&#8217;ve been using: \/*The Events Calendar Community Events Required Fields *\/ add_filter( &#039;tribe_events_community_required_fields&#039;, &#039;my_community_required_fields&#039;, 10, 1 ); function my_community_required_fields( $fields ) { $fields = array( [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/","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\/organizer-required-filter-not-working\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/","name":"Organizer required filter not working -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-06-19T23:45:26+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/organizer-required-filter-not-working\/#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":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Community Events","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/"},{"@type":"ListItem","position":5,"name":"Organizer required filter not working"}]},{"@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\/1129073","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":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1129073\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1129073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}