BUG - Image view numbers are valid names but cause errors

I noticed that when I just put numbers in for the ImageView alternative view names, I ended up with a document that had these fields permanently. I had to delete the slice of that model to get rid of those alternatives views even though I removed those numbered view names from the custom model and republished
image

In this model, I had removed all the just numbers (named) image.View options and I still recieve them from the api

The numbered image view name also didn't function but I could still enter it as a valid name

also as soon as you type "main" the box stops you from typing more.. idk if this is intentional but it makes having a name of "main_mobile" annoying to type in

Hello Ryan, thanks for reaching out!

This screenshot that you're showing us, where did you take it from?
I suppose the numbers that aren't going away are the ones that are just the number alone, without an underscore.

I wasn't able to replicate the issue n my end. It'll be useful if you could share with us a screen recording of the page where you're seeing these, or a screenshot of the Custom type builder if this persists in there, and the URL of your repository.

Thanks in advance

Hi Paulina,

Its a screenshot of the data model of the document i received from prismic API

I went and created a new test slice this morning to test it again.

So I think there is more than 1 bug involved in this situation possibly,

1st: If I name an ImageView with just a number name. I cannot actually update the image besides the main one selected. In the below link / gif you will see this happen (i couldn't attach, too large)
https://imgur.com/a/bapQ1dj

Here is the model for the slice:

          "testslice" : {
        "type" : "Slice",
        "fieldset" : "TestSlice",
        "description" : "Slice to test bug",
        "icon" : "3d_rotation",
        "display" : "list",
        "non-repeat" : {
          "test_image" : {
            "type" : "Image",
            "config" : {
              "constraint" : { },
              "thumbnails" : [ {
                "name" : "2",
                "width" : 1000,
                "height" : null
              }, {
                "name" : "2_mobile",
                "width" : 1000,
                "height" : null
              }, {
                "name" : "3",
                "width" : 1000,
                "height" : null
              }, {
                "name" : "3_mobile",
                "width" : 1000,
                "height" : null
              } ],
              "label" : "test image"
            }
          }
        },
        "repeat" : { }
      }

Here is what I received from the API

Bug 2: So now when I remove these numbered imageview names from the model, and update the document I still receive them from api.

step 1: Remove the views from the model: (this is what the model shall look like, Note i added a new view so i can update the document from the old version)

      "testslice" : {
        "type" : "Slice",
        "fieldset" : "TestSlice",
        "description" : "Slice to test bug",
        "icon" : "3d_rotation",
        "display" : "list",
        "non-repeat" : {
          "test_image" : {
            "type" : "Image",
            "config" : {
              "constraint" : { },
              "thumbnails" : [ {
                "name" : "2_mobile",
                "width" : 1000,
                "height" : null
              }, {
                "name" : "3_mobile",
                "width" : 1000,
                "height" : null
              }, {
                "name" : "4_mobile",
                "width" : 1000,
                "height" : null
              } ],
              "label" : "test image"
            }
          }
        },
        "repeat" : { }
      }

step 2: Update the document with, (republish, I always edit some info then republish after a data model edit)

step 3: Rebuild app, fetch the new api. and when that is done, The imageview still has numbered names, even though I removed it from the model, republished and rebuilt

Hope this helps some!

Ok, thanks a lot for all the additional information; this will help us figure out what's happening. The last thing I'll need is the URL of your repository and the name of the Custom type with this Slice. that way, we can reproduce the error on our end.

Looking forward to your response
Thanks!

This issue has been closed due to inactivity. Flag to reopen.