Sometimes when editing a page's layouts the layouts seemingly disappear (see video below).
It turns out that for some reason the mongodb database changes the layout type from an array of objects to an object of objects. This seems to be the reason for all the errors:
"testing four" has been edited after its initial creation, and therefore does not show the layouts, which in the db is an object of objects.
"snappy": "^7.2.2",
"aws-crt": "^1.18.0",
"aws4": "^1.12.0",
"bson-ext": "^4.0.3",
"kerberos": "^2.0.1",
"lucide-react": "^0.268.0",
"mongodb": "^5.7.0",
"mongodb-client-encryption": "^2.9.0",
"mongoose": "^7.4.3"