Ok, i’ll try to.
Thanx for the ready reply!
I’m using Custom Fields Creator as i said above. Also as i earlier, this is working smooth with ACF, so must be something specific to field groups or something.
In it, i’m using groups of fields to be repeated, in one of the situations i’m using an inline listing of a team, with the following fields: name, image, position.
Once you create a new repeater group, you define a meta for it. That’s the one i use when calling pll_copy_post_metas, in this case beeing called team, somewhere near the bottom of functions.php:
function copy_post_metas($metas) {
$result = array_merge($metas, array('team'));
return $result;
}
add_filter('pll_copy_post_metas', 'copy_post_metas');
In the original list everything goes well this is recorded database in the meta_value:
a:2:{i:0;a:3:{s:4:"name";s:8:"John Doe";s:6:"image";s:3:"486";s:6:"position";s:13:"Some Position";}i:1;a:3:{s:4:"name";s:8:"Jane Doe";s:6:"image";s:3:"488";s:6:"position";s:14:"Other Position";}}
However, in the copied list in the translated page you get this in the database under meta_value with these extra s:193:” and “; : …
s:193:"a:2:{i:0;a:3:{s:4:"name";s:8:"John Doe";s:6:"image";s:3:"486";s:6:"position";s:13:"Some Position";}i:1;a:3:{s:4:"name";s:8:"Jane Doe";s:6:"image";s:3:"488";s:6:"position";s:14:"Other Position";}}";
… and in the admin you get this error in the inline list as a result:
Warning: Invalid argument supplied for foreach() in C:\wamp\www\something\wp-content\plugins\custom-fields-creator\wordpress-creation-kit-api\wordpress-creation-kit.php on line 448
Once you clean that s:193:” and “; by hand, everything goes ok.
I screened around in your admin-filters.php file, only to find that the $value
beeing pushed in the add_post_meta($tr_id, $key, $value);
is sending the data perfectly.
Have no idea where that initial and ending extra info is coming from, numbers change, they are not consistent with any other data, have no idea for now of what they are. s:193:” and “;.
Thanx!