Hi everyone, I’m having a little bit of a problem when requesting data from a REST endpoint. I am currently using a single-type content type where I’ve added a dynamic zone with components that have relations to collections. i.e:. I have the collections Tutorials and Blogs and within my single type’s dynamic zone I have components Tutorial and Blog and each can have a relation to an item in their corresponding collections. When adding in a Tutorial there is no problem, the API returns all the info inside the item I’m requesting, however, when I add in a Blog I get the following error
I have no idea how to start debugging this, I’ve read that it might have something to do with knex.js. I’ve used relations in the past with no problems and I don’t get why this is happening right now as the Tutorials collection is basically identical to Blogs and it causes no issue. Thanks in advance for your insight.
Is your project code somewhere public that I can look at?
Yes I’ve just uploaded it here:
As much as I don’t think it’s the problem but can you please temporarily delete your WYSIWYG plugin?
You also have a bunch of mix-version packages:
All Strapi maintained packages (IE not the strapi-middleware-cache as it’s not ours) should be the same version without the carot
Fixing the package versions, clearing the lock file and reinstalling node_modules + rebuilding the admin and I can’t reproduce the issue so it’s most likely because your
strapi-connector-bookshelf is resolving to a higher version which is causing problems
Sure just deleted the plugin completely. And will try changing the versions rn
FYI if you want to use a community supported CKEditor plugin instead of maintaining your own: GitHub - strapi/awesome-strapi: A curated list of awesome things related to Strapi
Sadly it didn’t work. What I did:
- Update package.json file to include the same version for all Strapi maintained packages.
- Ran npm install --package-lock-only to update the lock file
- Ran npm install after deleting the node_modules folder
- Rebuilt admin with npm run build
Any other ideas?
I’m not sure I completely understand your model structure, can you give me a sample SQLite DB file (temporarily swap your database.js config out for the SQLite one)
Where you can reproduce the issue (use some random firstname.lastname@example.org for admin).
I can’t access the already existing admin if I change the db. Can I give you access to everything (postgresql db, strapi admin, etc) through a dm?