You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
When clearRelatedCache is enabled and a model contains a field which is a file collection, the following crash occurs:
TypeError: Cannot read property 'kind' of undefined
at /Users/foo/myproject/node_modules/strapi-middleware-cache/lib/index.js:195:51
at /Users/foo/myproject/node_modules/lodash/lodash.js:4967:15
at baseForOwn (/Users/foo/myproject/node_modules/lodash/lodash.js:3032:24)
at /Users/foo/myproject/node_modules/lodash/lodash.js:4936:18
at Function.forEach (/Users/foo/myproject/node_modules/lodash/lodash.js:9410:14)
at clearCache (/Users/foo/myproject/node_modules/strapi-middleware-cache/lib/index.js:194:13)
at async /Users/foo/myproject/node_modules/strapi-middleware-cache/lib/index.js:248:9
at async bustAdmin (/Users/foo/myproject/node_modules/strapi-middleware-cache/lib/index.js:318:11)
at async /Users/foo/myproject/node_modules/strapi/lib/middlewares/responses/index.js:9:9
at async cors (/Users/foo/myproject/node_modules/@koa/cors/index.js:95:16)
at async /Users/foo/myproject/node_modules/strapi/lib/middlewares/logger/index.js:56:11
at async /Users/foo/myproject/node_modules/strapi/lib/middlewares/responseTime/index.js:17:9
at async /Users/foo/myproject/node_modules/strapi/lib/services/metrics/middleware.js:29:5
at async /Users/foo/myproject/node_modules/strapi/lib/Strapi.js:325:9
In my project I have a field called imageGallery which looks like this:
When clearRelatedCache is enabled and a model contains a field which is a file collection, the following crash occurs:
In my project I have a field called imageGallery which looks like this:
I think the problem is in the getRelatedModels function, line 102ff:
In the first case, when attr.collection is true, I think it should also check that the collection != 'file'
The text was updated successfully, but these errors were encountered: