Exporting block fields

Created on 6 June 2023, about 1 year ago
Updated 7 June 2023, about 1 year ago

I have a field of type block_field in my content and when I try to export the content I'm seeing this message:

The value of Sidebar Widgets is empty because field type "block_field" is not exportable out-of-the-box. Check README for a workaround.

I looked in the README and I see some generic info about various hooks that are available, but nothing specific about block fields. Can someone point me in the right direction for adding some code that will allow me to export my block fields properly? Thank you!

πŸ’¬ Support request
Status

Closed: works as designed

Version

1.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States davedg629

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @davedg629
  • πŸ‡§πŸ‡ͺBelgium artycal

    The hook you should be overriding is hook_content_export_entity_alter, by replacing "hook" to the name of the module that is implementing the hook, for example for the single content sync module, it would be single_content_sync_content_export_entity_alter. To implement the hook, the resulting function should be placed inside the .module file.

    When you look at the hook in the single content sync module, you will see a switch that has a single case of 'my_custom_entity'. In your implementation of the hook that should be replaced with 'block_field', plus whatever else you need to alter to perform your export successfully, such as adding fields that should be exported from that content.

  • πŸ‡ΊπŸ‡ΈUnited States davedg629

    Thank you, this is the info I needed!

  • Status changed to Closed: works as designed about 1 year ago
Production build 0.69.0 2024