Custom blocks cannot be properly exported and imported

Created on 27 June 2016, over 8 years ago
Updated 12 March 2024, 8 months ago

Configuration management shouldn't export custom blocks as currently it will result in broken block.

A custom block is made of two entities, one for the placement and one for the actual content. Only the actual placement can be exported with cmi. The content can not.
Therefore this will result in "Block description Broken/Missing" error on site where the config is imported. And since there is no option to disable custom blocks from being exported through Configuration management this will break the functionality.

Steps to reproduce

On Site A:

  1. Create custom block
  2. Assign this custom block to any region
  3. Export configuration of the site

On Site B:

  1. Import configuration from site A
  2. Go to Block layout and you will see custom block in correctly assigned region, however block won't work or actually show anything.
  3. Edit that block, you will see this messages:
    • Block description Broken/Missing
      This block is broken or missing. You may be missing content or you might need to enable the original module.
  4. Go under Custom block library and you won't see custom block.

Block layout got exported but block content didn't resulting in broken relationship.

Suggested solution

Don't export custom blocks through Configuration management.

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡­πŸ‡·Croatia ws.agency Zagreb, Croatia

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡±Poland azovsky

    Looks like the Fixed Block Content module doesn't work anymore πŸ’¬ Module doesn't seem to do anything useful? Active .

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

    I agree with @hoporr @tamerzg and @morsok above: this issue needs to be fixed here in core.

    however @hoporr @jonathanshaw & @geerlingguy β€” yes it does render a site unusable the second you accidentally delete all blocks on production because of a config sync. Or worse yet doing a structural sync without importing everything, it will delete everything else.

    @bdanin β€” clearly discusses why this is an issue, an issue open for more than 8 years, is the reason why many still bring this up. It has never been resolved, the addition of modules that make up for cores inability to get it right after 8x, 9x, and 10x, do we expect this to be resolved in 11x after 9 or 10 years of asking the same question? please help me understand how this is helpful to the community at large.

Production build 0.71.5 2024