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

component_group_whitelist breaks when using "storyblok push-components" synchronisation

Open wldjfr opened this issue 4 years ago • 0 comments

The issue occurs while working with: (check one with "x")

  • [x] app.storyblok.com (CMS - Interface)
  • [ ] api.storyblok.com (CMS - Content Delivery API)
  • [ ] mapi.storyblok.com (CMS - Management API)
  • [ ] capi.storyblok.com (Commerce - API)
  • [ ] Commerce - Interface
  • [ ] Other:

Current behavior:

When pushing json components using the command storyblok push-components and regarding components groups, groups are successfully created but it breaks restrictions that are using "restrict_type":"groups"

example :

"name": "example_name",
      "display_name": null,
      "created_at": "2020-11-30T09:07:06.002Z",
      "updated_at": "2020-11-30T12:35:36.883Z",
      "id": 1212324,
      "schema": {
        "body": {
          "type": "bloks",
          "restrict_components": true,
          "restrict_type": "groups",
          "component_group_whitelist": [
            "f6f00d50-efcf-4c3c-ad13-xxx"
          ]
        }
      }

the components above need to be manually updated with the group restriction (which seams visually ok btw)

Expected behavior:

Restrictions using group of components should be working on the target space :)

Steps to reproduce:

Create a group restriction on space 1 Pull components from that space using storyblok cli Push components to another space using storyblok cli

Related code:

storyblok pull-components --space 2 (pull components from that space) storyblok push-components components.1.json --space 2 (push components to the target space)

wldjfr avatar Dec 17 '20 11:12 wldjfr