Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Emkaytoo opened this issue Sep 11, 2017 · 1 comment
Assignees

Comments

@Emkaytoo
Copy link

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
              }
            ]
          }
        }
      }
    },
@Emkaytoo
Copy link
Author

Update: I filled in the null value and reimported this Neo field. The error still occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants