Jumoo / uSyncMigrations

Rough and ready migration code.
Mozilla Public License 2.0
44 stars 57 forks source link

Migration issues - Grid Layout #263

Open smdooley opened 5 months ago

smdooley commented 5 months ago

I am encountering an error while running the migration process. The error message states that there is an issue with a grid layout configuration file. The exact message is: "Error reading string. Unexpected token: StartObject. Path 'config[1].applyTo'." It seems that the problem is related to the fact that the "applyTo" field is an object instead of a string. I have included a snippet of the file below for reference.

"config": [
      {
        "label": "Id",
        "description": "Set a id for this cell",
        "key": "id",
        "view": "textstring",
        "modifier": "{0}",
        "applyTo": "cell"
      },
      {
        "label": "Show full screen",
        "description": "Display the row across the entire screen",
        "key": "data-fullscreen",
        "view": "boolean",
        "applyTo": {
          "row": "Full Width"
        }
      },
      {
        "label": "Set background color",
        "description": "Set the background color",
        "key": "class",
        "view": "/App_Plugins/Our.Umbraco.GridSettings/editors/ColorPicker/view.html",
        "prevalues": [
          {
            "label": "Dark Blue",
            "value": "#013378"
          },
          {
            "label": "Light Blue",
            "value": "#cdd6e5"
          },
          {
            "label": "Pale Pink",
            "value": "#FFF1F5"
          },
          {
            "label": "Peach",
            "value": "#FFCDD9"
          },
          {
            "label": "Melrose",
            "value": "#9AA8FF"
          },
          {
            "label": "Pink",
            "value": "#ff0071"
          },
          {
            "label": "Sky",
            "value": "#9da8ff"
          },
          {
            "label": "Green",
            "value": "#71f5c4"
          },
          {
            "label": "Purple",
            "value": "#8149ff"
          }
        ],
        "applyTo": {
          "row": "",
          "cell": ""
        }
      },
      {
        "label": "Make bleed",
        "description": "Move content contained in this row so it bleeds into content above",
        "key": "data-makebleed",
        "view": "boolean",
        "applyTo": {
          "row": "Full Width"
        }
      },
      {
        "label": "Remove margin",
        "description": "Removes margin arrow the row so it can sit flush on top of other content",
        "key": "data-removemargin",
        "view": "boolean",
        "applyTo": "row"
      },
      {
        "label": "Hide content",
        "description": "Choose whether this content is hidden",
        "key": "data-hide",
        "view": "boolean",
        "prevalues": [
          "block",
          "none"
        ]
      },
      {
        "label": "Add line break",
        "description": "Adds a line break above and below content",
        "key": "data-lb",
        "view": "boolean",
        "applyTo": "cell"
      },
      {
        "label": "Remove bullet style",
        "description": "Removes any bullet list styles from this block of content",
        "key": "data-bullet",
        "view": "boolean",
        "applyTo": "cell"
      },
      {
        "label": "Colour Palette",
        "description": "Choose a Colour combination",
        "key": "class",
        "view": "radiobuttonlist",
        "prevalues": [
          "GREEN-PEACH",
          "GREEN-BLUE",
          "PINK-SKY",
          "PINK-PURPLE",
          "SKY-GREEN",
          "SKY-PEACH",
          "PURPLE-GREEN",
          "PURPLE-BLUE",
          "PEACH-GREEN",
          "PEACH-BLUE",
          "BLUE-GREEN",
          "BLUE-PEACH",
          "Blue quote with Punctuation",
          "Green quote with Punctuation",
          "Peach quote with Punctuation",
          "Purple quote with Punctuation",
          "Sky quote with Punctuation"
        ],
        "applyTo": {
          "row": "Young People Quote Layout,Young People Quote Layout - 2 Col"
        }
      },
      {
        "label": "Select punctuation",
        "description": "Select a punctuation if you have chosen a block with punctuation above",
        "key": "data-punctuation",
        "view": "radiobuttonlist",
        "prevalues": [
          "Exclamation",
          "Quote",
          "Question",
          "No-icon"
        ],
        "applyTo": {
          "row": "Young People Quote Layout,Young People Quote Layout - 2 Col"
        }
      },
      {
        "label": "Heading",
        "description": "Provide a heading",
        "key": "data-heading",
        "view": "textstring",
        "applyTo": {
          "row": "Young People Quote Layout,Young People Quote Layout - 2 Col"
        }
      },
      {
        "label": "Remove Quotes?",
        "description": "Do you want to remove the quotes around the blocks?",
        "key": "data-quotes",
        "view": "boolean",
        "applyTo": {
          "row": "Young People Quote Layout,Young People Quote Layout - 2 Col"
        }
      }
    ]