{"id":1280635,"date":"2017-05-08T21:49:29","date_gmt":"2017-05-09T04:49:29","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/"},"modified":"2017-05-08T21:49:29","modified_gmt":"2017-05-09T04:49:29","slug":"metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/","title":{"rendered":"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays"},"content":{"rendered":"<p>This topic follows on from <a href=\"https:\/\/wordpress.org\/support\/topic\/illegal-string-offsets-_eventcost-in-event-metadata\/#post-9110924\">one on wp.org<\/a><\/p>\n<p>My event metadata, as stored in MySQL, appears corrupted. I&#8217;ve got string values of serialized data, where I should be seeing serialized array data. The issue has only recently occurred, but I&#8217;ve seen it on 2 sites, in different places in the plugin. How can the data in the database look like this:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png\" alt=\"PhpMyAdmin postmeta\" \/><\/p>\n<p>The last 6 entries appear to have been &#8216;double serialized&#8217; before insert.<\/p>\n<p>Trying to work with these values stops the plugin, and PHP execution ends, returning a 500 when trying to save a new or updated Event.<\/p>\n<p>[09-May-2017 01:56:12 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Tribe__Events__Pro__Recurrence__Series_Rules_Factory::build_from() must be of the type array, string given, called in<br \/>\n\/home\/xxxxxxx\/public_html\/wp-content\/plugins\/events-calendar-pro\/src\/Tribe\/Recurrence\/Meta.php on line 1056 and defined in \/home\/xxxxxxx\/public_html\/wp-content\/plugins\/events-calendar-pro\/src\/Tribe\/Recurrence\/Series_Rules_Factory.php:32<\/p>\n<p>Stack trace:<br \/>\n#0 \/home\/xxxxxxx\/public_html\/wp-content\/plugins\/events-calendar-pro\/src\/Tribe\/Recurrence\/Meta.php(1056): Tribe__Events__Pro__Recurrence__Series_Rules_Factory-&gt;build_from(&#8216;a:3:{s:5:&#8221;rules&#8230;&#8217;, &#8216;rules&#8217;)<br \/>\n#1 \/home\/xxxxxxx\/public_html\/wp-content\/plugins\/events-calendar-pro\/src\/Tribe\/Recurrence\/Events_Saver.php(45): Tribe__Events__Pro__Recurrence__Meta::get_recurrence_for_event(8031)<br \/>\n#2 \/home\/xxxxxxx\/public_html\/wp-content\/plugins\/events-calendar-pro\/src\/Tribe\/Recurrence\/Meta.php(549): Tribe__Events__Pro__Recurrence__Events_Saver-&gt;save_events()<br \/>\n#3 \/home\/xxxxxxx\/public_html\/wp-includes\/class-wp-hook.php(298): in \/home\/xxxxxxx\/public_html\/wp-content\/plugins\/events-calendar-pro\/src\/Tribe\/Recurrence\/Series_Rules_Factory.php on line 32<br \/>\n`<br \/>\n<code>build_from()<\/code> expects an array, and gets a string, because a string has been stored in the DB.<\/p>\n<p>WP 4.7.4<br \/>\nEV 4.5.1<br \/>\nEV-Pro 4.4.7<br \/>\nPHP 7.0.18<br \/>\nMySQL 5.6.35<\/p>\n","protected":false},"template":"","class_list":["post-1280635","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>metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays -<\/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\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays -\" \/>\n<meta property=\"og:description\" content=\"This topic follows on from one on wp.org My event metadata, as stored in MySQL, appears corrupted. I&#8217;ve got string values of serialized data, where I should be seeing serialized array data. The issue has only recently occurred, but I&#8217;ve seen it on 2 sites, in different places in the plugin. How can the data [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png\" \/>\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\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/\",\"name\":\"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png\",\"datePublished\":\"2017-05-09T04:49:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#primaryimage\",\"url\":\"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png\",\"contentUrl\":\"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#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\":\"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays\"}]},{\"@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":"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays -","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\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/","og_locale":"en_US","og_type":"article","og_title":"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays -","og_description":"This topic follows on from one on wp.org My event metadata, as stored in MySQL, appears corrupted. I&#8217;ve got string values of serialized data, where I should be seeing serialized array data. The issue has only recently occurred, but I&#8217;ve seen it on 2 sites, in different places in the plugin. How can the data [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/","og_image":[{"url":"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png","type":"","width":"","height":""}],"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\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/","name":"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#primaryimage"},"image":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#primaryimage"},"thumbnailUrl":"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png","datePublished":"2017-05-09T04:49:29+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#primaryimage","url":"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png","contentUrl":"https:\/\/dl.dropboxusercontent.com\/u\/2803129\/sshot-914.png"},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/metadata-double-serialized-stored-as-strings-in-db-not-serialized-arrays\/#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":"metadata &#039;double-serialized&#039;, stored as strings in DB, not serialized arrays"}]},{"@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\/1280635","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\/1280635\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1280635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}