mc-acf-flexible-template icon indicating copy to clipboard operation
mc-acf-flexible-template copied to clipboard

inter-site import/export a.k.a. site-independant serialization

Open drzraf opened this issue 5 years ago • 2 comments

ACF template helps me translating complex flexible field contents from one site to another one.

Describe the solution you'd like I'd like to be able to export/import a template from one WordPress instance to another. It'd only include attached images if importer was told so at the time of import.

Describe alternatives you've considered Since ACF templates are custom post types. I thought standard tools would support it out of the box.

  • export : Exporting acf-templates as a WXR file works (although see below about serialization).
  • import: Assuming an "import plugin" is enabled (I tried rmccue's WordPress Importer v2), it also works

This results in a new ACF template :

  1. Being imported and created
  2. Being listed
  3. Having its correct meta attached
  4. Whic appears as empty in the template editor UI.

Additional context Templates are mostly stored in a _flex_layout_data which is serialized. But "here is the point" : the serialized form is not "installation-independant". It's probably related to why imported templates are shown as empty.

drzraf avatar Oct 21 '19 23:10 drzraf

I'm sorry but I don't understand what's you mean by "the serialized form is not "installation-independant""

MarieComet avatar Oct 22 '19 07:10 MarieComet

The storage of an ACF template keeps referencing other elements of the website. As such it can't be exported/imported as-is into another website that would want to make use of this template.

drzraf avatar Oct 22 '19 11:10 drzraf