metadata 'double-serialized', stored as strings in DB, not serialized arrays

Home Forums Calendar Products Events Calendar PRO metadata 'double-serialized', stored as strings in DB, not serialized arrays

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1280635
    dmrdigital
    Participant

    This topic follows on from one on wp.org

    My event metadata, as stored in MySQL, appears corrupted. I’ve got string values of serialized data, where I should be seeing serialized array data. The issue has only recently occurred, but I’ve seen it on 2 sites, in different places in the plugin. How can the data in the database look like this:

    PhpMyAdmin postmeta

    The last 6 entries appear to have been ‘double serialized’ before insert.

    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.

    [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
    /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

    Stack trace:
    #0 /home/xxxxxxx/public_html/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php(1056): Tribe__Events__Pro__Recurrence__Series_Rules_Factory->build_from(‘a:3:{s:5:”rules…’, ‘rules’)
    #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)
    #2 /home/xxxxxxx/public_html/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php(549): Tribe__Events__Pro__Recurrence__Events_Saver->save_events()
    #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
    `
    build_from() expects an array, and gets a string, because a string has been stored in the DB.

    WP 4.7.4
    EV 4.5.1
    EV-Pro 4.4.7
    PHP 7.0.18
    MySQL 5.6.35

    #1281954
    Andras
    Keymaster

    Hello miles,

    Thanks for going Pro and welcome to the forums! I’m sorry about this issue with the serialization.

    If I understand correctly, if you try to open the events for editing associated with those entries, then you get an error and cannot edit it?

    Are you able to recreate the issue? Did this happen more times than the above 2 events?

    Are those events newly created or old ones edited when this happened? If old, then were the events created with a previous version of the plugin? Which?

    Can you share how you set up those events? Can you potentially share a full database dump so we can take a look at those entries in full?

    If you can give me any more details about the incident that might be helpful in uncovering the source of the issue.

    Thanks and I’m looking froward to solving this with you.

    Cheers,
    Andras

    #1291869
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘metadata 'double-serialized', stored as strings in DB, not serialized arrays’ is closed to new replies.