I am using a media representation bundle on an entity, and have it restricted to a object representation type of 'image'.
However when creating a representation, it uses the default object representation type (the one at the top or the one set explicitly as the default), even if this type is not the type you have restricted the bundle to. This means you can add a representation and then it disappears from view, because of your restriction.
If however in the 'show for editing' you include the 'type' list, it will only show the type you have restricted it to and all is ok.
Should a check be put in place to make sure if it falls back to the default type value that it picks one of the types the bundle is restricted to? Obviously, if you don't have the type ticked in 'show for editing' it would usually mean there is only one type, so no need to have anyone select it.
I am using a media representation bundle on an entity, and have it restricted to a object representation type of 'image'. However when creating a representation, it uses the default object representation type (the one at the top or the one set explicitly as the default), even if this type is not the type you have restricted the bundle to. This means you can add a representation and then it disappears from view, because of your restriction. If however in the 'show for editing' you include the 'type' list, it will only show the type you have restricted it to and all is ok.
Should a check be put in place to make sure if it falls back to the default type value that it picks one of the types the bundle is restricted to? Obviously, if you don't have the type ticked in 'show for editing' it would usually mean there is only one type, so no need to have anyone select it.
Hope this makes sense.