bobbingwide / oik-clone

Clone content between sites
https://www.oik-plugins.com/oik-plugins/oik-clone-clone-your-wordpress-content/
GNU General Public License v2.0
5 stars 0 forks source link

Cater for ACF field types which store post/taxonomy term IDs #71

Open bobbingwide opened 1 year ago

bobbingwide commented 1 year ago

ACF provides several field types which store post IDs in the post meta data. When the post is cloned the post IDs in the post meta are not mapped. This can lead to a block that references the field being broken in the target. The requirement is to be able to map the field values to the target post ID.

There's a similar problem for the taxonomy field type, which stores taxonomy term IDs

Requirement

Proposed solution

The post IDs stored in the post meta data need to be catered for in a similar manner to the current handling for the post featured image.

Question: Should oik-clone be aware of ACF or should another routine be responsible for causing ACF field values to be included?

What about other field types such as User?

bobbingwide commented 1 year ago

In the example that failed, the Image field ( https://s.b/oikcom/wp-admin/post.php?post=49022&action=edit ) the source post ID was 31306. In the server the post ID is 33255 for for oik-plugins.co.uk and 35655 in oik-plugins.com

bobbingwide commented 1 year ago

There was also a problem with the Checkbox field type. Notice: Undefined index: a:1:{i:0;s:3:”red”;} in /home/customer/www/oik-plugins.co.uk/public_html/wp-content/plugins/acf-field-block/includes/class-acf-field-block-renderer.php on line 446

Raised as https://github.com/bobbingwide/acf-field-block/issues/13 and #72