storyblok-cli icon indicating copy to clipboard operation
storyblok-cli copied to clipboard

Pull/Push components does not sync the component_group_whitelist correctly since 3.33.0

Open royvou opened this issue 5 months ago • 2 comments

Current behavior: When using version 3.33.0 or higher and syncing components via the pull/push components command, the component_group_whitelist does not get updated, resulting in an user not being able to select any block.

Expected behavior: When using the pull/push components commands to sync blocks, they keep the component_group_whitelist

Steps to reproduce:

  • Create a block folder blockFolder1
  • Create one block of type universal
    • create a block called block1 with 1 Blocks field called field1, whitelist blocks fromt he blockFolder
  • Create one block of type nestable block
    • create a block called block2 and put it in the blockFolder1
  • Create a story based on block1 and in field1 try to create a new block
  • Run the following script between multiple spaces (use the correct source/target)
DEV=1
PRD=2

storyblok pull-components --space $DEV
storyblok push-components --space $PRD ./components.$DEV.json --presets-source ./presets.$DEV.json
  • Go

Other information:

  • Related commit
    • https://github.com/storyblok/storyblok-cli/commit/c05e64483b399e7437e2612a753e85a3c485a0e1
  • Related Code
    • https://github.com/storyblok/storyblok-cli/blob/master/src/tasks/push-components.js#L21C7-L21C22

in the old version source_uuid was added during sync to correctly map the block (Using the getGroupByUuid) but source_uuid is now never generated/mapped anymore

royvou avatar Sep 13 '24 15:09 royvou