{"id":1253549,"date":"2017-03-13T15:08:54","date_gmt":"2017-03-13T22:08:54","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/"},"modified":"2017-03-15T01:40:28","modified_gmt":"2017-03-15T08:40:28","slug":"possible-bug-with-recurrence-series-using-last-day-of-the-month","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/","title":{"rendered":"Possible bug with recurrence series using last day of the month"},"content":{"rendered":"<p>Hello,<\/p>\n<p>We have a client who tried creating an event which recurred event month on the last day of the month. When the event is saved, the site eventually times out and the recurrence isn&#8217;t successfully saved. I took a look at the error logs and tracked down the potential source of the issue:<\/p>\n<p>During the save process, <code>Tribe__Date_Utils::get_last_day_of_week_in_month( $curdate, $day_of_week )<\/code> is called (a function of a utility class defined in the non-pro Events Calendar plugin), and the value of <code>$day_of_week<\/code> passed in is 8. The documentation for this function says that this parameter is meant to be &#8220;The index of the day of the week&#8221; and I&#8217;m assuming 8 is an invalid value (I&#8217;d assume it would be 6 or 7 depending on if the index is 0 or 1-based). As a result, the while loop in that function runs infinitely.<\/p>\n<p>I&#8217;ve been able to recreate this issue on a fresh install of WP 4.7.3 running the Twenty Sixteen theme and EC and ECP plugins version 4.4.4.<\/p>\n","protected":false},"template":"","class_list":["post-1253549","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>Possible bug with recurrence series using last day of the month -<\/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\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Possible bug with recurrence series using last day of the month -\" \/>\n<meta property=\"og:description\" content=\"Hello, We have a client who tried creating an event which recurred event month on the last day of the month. When the event is saved, the site eventually times out and the recurrence isn&#8217;t successfully saved. I took a look at the error logs and tracked down the potential source of the issue: During [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-03-15T08:40:28+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\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/\",\"name\":\"Possible bug with recurrence series using last day of the month -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-03-13T22:08:54+00:00\",\"dateModified\":\"2017-03-15T08:40:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/#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\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Possible bug with recurrence series using last day of the month\"}]},{\"@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":"Possible bug with recurrence series using last day of the month -","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\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/","og_locale":"en_US","og_type":"article","og_title":"Possible bug with recurrence series using last day of the month -","og_description":"Hello, We have a client who tried creating an event which recurred event month on the last day of the month. When the event is saved, the site eventually times out and the recurrence isn&#8217;t successfully saved. I took a look at the error logs and tracked down the potential source of the issue: During [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/","article_modified_time":"2017-03-15T08:40:28+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\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/","name":"Possible bug with recurrence series using last day of the month -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-03-13T22:08:54+00:00","dateModified":"2017-03-15T08:40:28+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/possible-bug-with-recurrence-series-using-last-day-of-the-month\/#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":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Possible bug with recurrence series using last day of the month"}]},{"@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\/1253549","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\/1253549\/revisions"}],"predecessor-version":[{"id":1254282,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1253549\/revisions\/1254282"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1253549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}