Cannot import (update) some blocks but not others

Created on 5 April 2022, almost 3 years ago
Updated 21 January 2025, 1 day ago

Problem/Motivation

I've made edits to some custom blocks in my development system, and I want to push these changes out to the live system. The live system includes other custom blocks, which end users may have edited, so I want to be sure that when I push my changes to the live system, I only update the specific blocks I have updated, and no others.

There appears to be no way to do this.

The "Import custom blocks (safely)" option wont do the task, as this will only create new blocks, not update existing ones.

I tried using the "Import custom blocks (full)" option, after de-selecting all the blocks apart from the ones I wanted to change. The result: all the other blocks got deleted. (This was very alarming on our live system!). I would have expected the unselected blocks to be ignored.

If there is a way to do this then I'm making a documentation/support request. If there is not a way to do this, then I'm making a feature request. If there is supposed to be a way to do this, then I'm making a bug report.

Steps to reproduce

1. Edit a custom block.

2. Export all custom blocks.

3. In the import pane, deselect all blocks except the edited one, and click "Import custom blocks (full)".

4. Click "Back to Site". You'll find that all your custom blocks are gone, except for the edited one.

If instead, at step 1, we export only the edited block, the outcome is the same: The blocks that are not included in the export get deleted when a "Full" import is done. (This is in line with the documentation, which states that a full import "Deletes any custom blocks not in config." However, the documentation also states the full import is "Basically a safe import with update actions for already existing custom blocks." This is misleading.)

Proposed resolution

I think that the Full import option should be amended so that it:

  • Ignores blocks that have been deselected.
  • Ignores blocks that are not included in the config.

Perhaps the Full import option should be renamed "Update". Or maybe there should be an extra import option that operates in this way?

If people really do want to delete all the blocks not included in the config, isn't that what the Force import option is for?

Remaining tasks

Implement the changes.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

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.

  • πŸ‡ͺπŸ‡ΈSpain cesarmsfelipe

    Hi, I have managed to reproduce the error.
    I have solved it by changing the language of the structure sync configuration, which by default is set to β€˜en’ and my site was using β€˜es’, by changing that, importing configuration and importing custom blocks (full), the edit and delete works correctly.

Production build 0.71.5 2024