Open laurenskling opened 2 months ago
If you want to see it in action:
https://github.com/strapi/strapi/issues/21354 https://discord.com/channels/811989166782021633/1095091586452426824/1286021240842223678
Hey @laurenskling I think we fixed that before stable. Do you confirm ?
@alexandrebodin this happened to me when I installed 5.0.0 on my actual codebase. Even with clean DB. Will try to make a good reproduction a.s.a.p., because it does not seem to happen on my clean installed example project. It also doesn't happen on all relation. Will need to look into it why it happens on my searchResultsPage...
Thank you 🙏
@alexandrebodin Step closer! Just realized, these content types doing this have a (component) field called filters
!
If I rename them, the error is gone. Is filters
a key we should not use? I think it's conflicting in the code of countDraftRelations on actual document filters.
Wow nice find. it will help see if we can fix the code or if we need to prevent the use of this name 🙏 You rock!
We are working on a fix, filters
should be a valid attribute name 😃
@Marc-Roig this is still happening to me on 5.3.0, is it not included in the release?
it should be included in 5.3.0 🤔 is it the same exact issue? you see that error when having a filters
attribute in your schema?
Jep. 5.3.0:
Request URL:
http://0.0.0.0:1337/content-manager/collection-types/plugin::vehicles.vdp/q7v8ji0n0zklg2xbe31dslfr/actions/countDraftRelations?
Request Method:
GET
Status Code:
400 Bad Request
{
"data": null,
"error": {
"status": 400,
"name": "ValidationError",
"message": "Invalid key publishedAt at searchResultsPage.filters",
"details": {
"key": "publishedAt",
"path": "searchResultsPage.filters"
}
}
}
We are working on this internally! we aim to fix this by this week
Bug report
Required System information
Describe the bug
When going to a entry which has relations to content types without draftAndPublish, the countDraftRelations API call crashes and throws errors.
Steps to reproduce the behavior
Expected behavior
no error.
Screenshots