Skip to content

I think Relabel may not be supported on Neo blocks that aren't top-level accessible #54

@Emkaytoo

Description

@Emkaytoo

Weird issue:

  1. Neo field had two blocks: Top and Child.
  2. Both blocks had fields using Relabel.
  3. Top imported fields to block and relabeled properly.
  4. Child did not import fields to block, and thus didn't have anything to relabel.

Either the Child type is throwing an issue, or the null (code below) is causing an issue.


    {
      "group": "Page Content",
      "name": "Column Builder",
      "handle": "columnBuilder",
      "instructions": "Build out a three-column layout using this field.",
      "required": false,
      "type": "Neo",
      "typesettings": {
        "maxBlocks": "4",
        "groups": {
          "name": [],
          "sortOrder": []
        },
        "blockTypes": {
          "new0": {
            "sortOrder": "1",
            "name": "Section",
            "handle": "builderSection",
            "maxBlocks": "1",
            "childBlocks": [
              "column"
            ],
            "maxChildBlocks": null,
            "topLevel": "1",
            "fieldLayout": {
              "Content": [
                "featuredImage"
              ]
            },
            "relabel": [
              {
                "field": "featuredImage",
                "name": "Background Image",
                "instructions": "The background for this section. The photo will be behind every column in this section."
              }
            ]
          },
          "new1": {
            "sortOrder": "2",
            "name": "Column",
            "handle": "column",
            "maxBlocks": "3",
            "childBlocks": "",
            "maxChildBlocks": null,
            "topLevel": "0",
            "fieldLayout": {
              "Content": [
                "columnHeadline",
                "copy",
                "blockButton"
              ]
            },
            "relabel": [
              {
                "field": "columnHeadline",
                "name": "Headline",
                "instructions": "Use the Bold function to change the text from black to blue."
              },
              {
                "field": "blockButton",
                "name": "Button",
                "instructions": null
              }
            ]
          }
        }
      }
    },

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions