Pennebaker / craftcms-thearchitect

CraftCMS plugin to generate content models from JSON data.
MIT License
171 stars 9 forks source link

Positions field imports faulty values to the db #37

Closed jberglund closed 7 years ago

jberglund commented 7 years ago

Export looks like this: "16": { "name": "Image position", "handle": "position", "required": 0, "type": "PositionSelect", "typesettings": { "options": [ "left", "center", "right", "full" ] } }

When import is executed it shows up as {"options":[0,1,2,3]} in the database. The correct values should be {"options":["left","center","right","full"]}

This is a block inside a matrix btw.

spAnser commented 7 years ago

Should be fixed in v1.6.0-beta.3 export the model again.

Or you can change typesettings.options to an object with the values equaling true.

{
    "options": {
        "left": true,
        "center": true,
        "right": true,
        "full": true
    }
}