WordPress.org

Forums

WP CSV
[resolved] Importing Serialized data for custom fields. (7 posts)

  1. dharward
    Member
    Posted 9 months ago #

    I am trying to import some custom post data. One of the fields is a checkbox that seems to need to be serialized data. I have tried to import data that was not serialized but it was not working so I went and pulled all of the serialized strings and setup the import file but those are not pulling in.

    Any ideas on how to fix this issue?

    https://wordpress.org/plugins/wp-csv/

  2. CPK Web Solutions
    Member
    Plugin Author

    Posted 9 months ago #

    Hi Dharward

    Been a while, but last time I checked, the plugin did export and import serialized data within custom fields. NOTE: serialized data will be converted to JSON format in the export CSV file.

    As always, the quick start guide process is recommended. Iow, create at least one post with the serialized data manually, then export to see how it should look. If you re-import in the same format, it should work.

    Best wishes

    Paul

  3. dharward
    Member
    Posted 9 months ago #

    I tried that. I went through and created a sample of posts manually with the needed checkboxes in place and exported them. I then put that information into the main import file but its still not importing the fields the serialized field is blank after the import is done.

  4. dharward
    Member
    Posted 9 months ago #

    Is there a way to just import the normal information and let it be serialized as its imported? I know the text variables that the field stores in the database.

  5. dharward
    Member
    Posted 9 months ago #

    I created a few posts manually and exported them and one of the samples I created showes that value as:

    {"wpcf-fields-checkboxes-option-97bff9ca227d8a38abe95efccf9e0681-1":"Cardiology"}

    I then took those 20 different variables I had and created posts for them and exported them, then took those values similar to the one above and put them in the proper place.

    When it imports the values are blank and if I take it and export it again the values are:
    a:0:{}

    Which appears to be the value of anything thats left blank in that column

  6. dharward
    Member
    Posted 9 months ago #

    I have even tried to take an exported file and re-import it (after completely deleting all of those posts), but that does not seem to bring anything in at all. I thought if anything would work that would.

    I am able to bring in some posts with the import file I built based off of the export file, but the serialized info is not working.

  7. CPK Web Solutions
    Member
    Plugin Author

    Posted 9 months ago #

    For everyone else's information...

    Dharward hired me to troubleshoot this and it was discovered that WP-CSV was working, but that the Types plugin was blanking the custom field (an on save hook fires and Types doesn't perform adequate checks).

    Anyone experiencing this issue can verify by de-activating Types and then attempting import again. Fixing in WP-CSV would be a little convoluted. Best to contact the authors of Types to request a fix.

    Best wishes

    Paul

Reply

You must log in to post.

About this Plugin

  • WP CSV
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.