Title: Serialised custom fields
Last modified: August 20, 2016

---

# Serialised custom fields

 *  Resolved [xave](https://wordpress.org/support/users/xave/)
 * (@xave)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/serialised-custom-fields/)
 * Superb plugin, answers a huge issue with workflow.. thanks!
 * I’ve had an issue with creating drafts where serialised data was getting re-serialised
   again:
    ie. a:1:{s:5:”posts”;a:5:…. was turning into s:54:”a:1:{s:5:”posts”;a:
   5:….
 * So I’ve added the following fix within the function: transfer_post_meta > foreach
   
   if (is_serialized( $value[0] )) { $value[0] = unserialize($value[0]); }
 * Could you check this and add to next version.
 * Also having few issues with taxonomies not being added on creating new drafts..
   Hopefully is something simple (however, using presspermit so could be permissions?)
 * Thanks again
    Xavier
 * [http://wordpress.org/extend/plugins/drafts-of-post-revisions/](http://wordpress.org/extend/plugins/drafts-of-post-revisions/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [daxitude](https://wordpress.org/support/users/daxitude/)
 * (@daxitude)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/serialised-custom-fields/#post-3202286)
 * Hey, thanks for catching this. I pushed a fix to the [github repo](https://github.com/daxitude/wp-draft-revisions)
   under a new branch. The tests are passing, but I want to make sure everything
   looks good before merging it in. In the mean time, you can stick with what you
   have if it works, or checkout the branch from github, or [compare the changes](https://github.com/daxitude/wp-draft-revisions/compare/fix-serialization)
   and make adjustments manually (I used the [maybe_unserialize](http://codex.wordpress.org/Function_Reference/maybe_unserialize)
   method).
 * I create a few more tests for the transfer of taxonomies to drafts, but haven’t
   found a condition where the transfer fails. Can you tell me a little more about
   your setup, e.g. are they custom post types, custom taxonomies, anything atypical
   about post type or taxonomy registration, etc?
 * (sorry for late reply…failed to get email notification)
 *  Thread Starter [xave](https://wordpress.org/support/users/xave/)
 * (@xave)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/serialised-custom-fields/#post-3202290)
 * Hi there dude – sorry, didn’t get email notification either!
 * I’ve updated my install with the maybe_unserialize – certainly works in slightly
   less clumsy way than my code..
 *  Plugin Author [daxitude](https://wordpress.org/support/users/daxitude/)
 * (@daxitude)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/serialised-custom-fields/#post-3202291)
 * This fix was included in v0.7.2

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Serialised custom fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/drafts-of-post-revisions.svg)
 * [Drafts of Post Revisions](https://wordpress.org/plugins/drafts-of-post-revisions/)
 * [Support Threads](https://wordpress.org/support/plugin/drafts-of-post-revisions/)
 * [Active Topics](https://wordpress.org/support/plugin/drafts-of-post-revisions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/drafts-of-post-revisions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/drafts-of-post-revisions/reviews/)

## Tags

 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [serialized](https://wordpress.org/support/topic-tag/serialized/)

 * 3 replies
 * 2 participants
 * Last reply from: [daxitude](https://wordpress.org/support/users/daxitude/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/serialised-custom-fields/#post-3202291)
 * Status: resolved