Hi, has anyone ever faced this issue? My Strapi Admin ui is trying to request entities with an invalid url - it includes [object Object] as a string. Therefore the admin ui displays nothing - although my database contains four entries.
This topic has been created from a Discord post (1292919648618152009) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
this does not fix itself with a restart / rebuild
Ive narrowed it down a bit.
It does not show entries create via db.query
status: 'draft',
data: {
// @ts-ignore
title: body.title ?? "Neues Workout",
user: {
// db.query uses the actual id, not the document id
connect: [userId]
},
workout_type: {
// db.query uses the actual id, not the document id
connect: [body.workoutTypeId]
}
},
// @ts-ignore
populate: ['user', 'exercises', 'workout_type'],
});
however, entries create via db.query
do not show up, but are being created successfully and written to the same database table.
status: 'draft',
data: {
// @ts-ignore
title: body.title ?? "Neues Workout",
user: {
// db.query uses the actual id, not the document id
connect: [userId]
},
workout_type: {
// db.query uses the actual id, not the document id
connect: [body.workoutTypeId]
}
},
// @ts-ignore
populate: ['user', 'exercises', 'workout_type'],
});
the five entries have been created via the above db.query
ive also noticed that I can pass the entity ID instead of the documentId to the connect property and it still successfully connects. Shouldnt this only allow the documentId?
You shouldn’t be using db.query directly in Strapi 5
Hence why we have specifically hidden the documentation related to it unless you know the exact URL to view that documentation
well, the document service instead forces me to add //ts-ignore’s everywhere, thats why ive at times switched over to db.query.