1
votes

I am developing a WordPress theme and using CMB2 for Metaboxes. Facing a problem to import the meta data (field type: group and repeatable) via WordPress Importer.

I've total 8 group fields and 2 of them isn't importing properly. Rest others are getting imported fine.

Any idea about why this happen? I need to fix it for preparing the demo data. How can i resolve it?

These fields are saved as serialized data.

I am using the wordpress-importer! plugin for importing demo data.

Here is a sample of exported meta data for a post. But it's not getting imported via WordPress Importer.

1
You should post some example code (Minimal, Complete, Verifiable Example or a Short, Self-Contained, Correct Example). Include what you've already tried and where exactly you're stuck. See more info at How do I ask a good question? Thanks!Will
I am using the wordpress.org/plugins/wordpress-importer plugin for importing. No custom codes.Khorshed Alam

1 Answers

1
votes

Don't know why, but importers serialize twice the group field value in postmeta table...

For my part, I unserialize "manually" (...with a little script) the meta_value returned by :

SELECT * FROM `wp_postmeta` where meta_value like 's:%' AND meta_key IN ('my_identification_group', 'my_other_identification_group')