{"id":1602882,"date":"2018-08-22T05:43:16","date_gmt":"2018-08-22T12:43:16","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/"},"modified":"2018-08-22T05:43:16","modified_gmt":"2018-08-22T12:43:16","slug":"events-listing-page-broken-after-editing-recurring-event","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/","title":{"rendered":"Events listing page broken after editing recurring event"},"content":{"rendered":"<p>We are using the Events Calendar PRO + Filter PRO plugins on a website of ours. We noticed that after editing an instance of a recurring event two things stopped working OK:<\/p>\n<p>1. The events listing page on the frontend ( \/events) got a long loading time, and after a certain timeout the page got loaded broken &#8211; the header only.<\/p>\n<p>2. The events listing in the admin showed 5 empty pages of events. On some pages (e.g. page 4) there were a couple of events, but the rest of the pages stayed visibly empty, though there were obviously some ghost entries that caused the pagination to show 5 pages.<\/p>\n<p>We noticed that disabling the PRO plugin fixed things. On further investigation we saw that what caused this was that the post that was edited latest had become a parent to itself (in the DB). And this caused a loop in this function:<\/p>\n<p><code>Tribe__Events__Pro__Recurrence__Permalinks::filter_recurring_event_permalinks, function get_primary_event()<\/code><\/p>\n<p>&#8230;(found in Recurrence\/Permalinks.php). <\/p>\n<p>Probably, this specific piece of code:<\/p>\n<pre><code>while ( ! empty( $post-&gt;post_parent ) ) {\n\t\t\t$post = get_post( $post-&gt;post_parent );\n\t\t}\n\n\t\treturn $post;\n<\/code><\/pre>\n<p>Maybe what caused this was that we edited an instance of the event, and not the main event. But I would expect the plugin to be smart enough to check and take care to make the proper changes in such a way as not to break the output.<\/p>\n<p>For now we have removed the parent IDs for the self-parenting posts\/events, but I am not sure if this won&#8217;t happen again.<\/p>\n","protected":false},"template":"","class_list":["post-1602882","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>Events listing page broken after editing recurring event -<\/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\/events-listing-page-broken-after-editing-recurring-event\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Events listing page broken after editing recurring event -\" \/>\n<meta property=\"og:description\" content=\"We are using the Events Calendar PRO + Filter PRO plugins on a website of ours. We noticed that after editing an instance of a recurring event two things stopped working OK: 1. The events listing page on the frontend ( \/events) got a long loading time, and after a certain timeout the page got [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/\" \/>\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\/events-listing-page-broken-after-editing-recurring-event\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/\",\"name\":\"Events listing page broken after editing recurring event -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-08-22T12:43:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/#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\":\"Events listing page broken after editing recurring event\"}]},{\"@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":"Events listing page broken after editing recurring event -","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\/events-listing-page-broken-after-editing-recurring-event\/","og_locale":"en_US","og_type":"article","og_title":"Events listing page broken after editing recurring event -","og_description":"We are using the Events Calendar PRO + Filter PRO plugins on a website of ours. We noticed that after editing an instance of a recurring event two things stopped working OK: 1. The events listing page on the frontend ( \/events) got a long loading time, and after a certain timeout the page got [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/","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\/events-listing-page-broken-after-editing-recurring-event\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/","name":"Events listing page broken after editing recurring event -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-08-22T12:43:16+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/events-listing-page-broken-after-editing-recurring-event\/#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":"Events listing page broken after editing recurring event"}]},{"@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\/1602882","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\/1602882\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1602882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}