Support » Plugin: Drafts of Post Revisions » Serialised custom fields

  • Resolved xave


    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author daxitude


    Hey, thanks for catching this. I pushed a fix to the github repo 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 and make adjustments manually (I used the 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)

    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


    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.