Missing FROM-clause for table xxxx

System Information
  • Strapi 3.4.6:
  • Linux:
  • Postgresql:
  • Node 12.16.3:
  • NPM 6.14.4:
  • No yarn:

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:

    "strapi": "3.4.6",
    "strapi-admin": "3.4.6",
    "strapi-connector-bookshelf": "^3.4.6",
    "strapi-middleware-cache": "^1.5.0",
    "strapi-plugin-content-manager": "3.4.6",
    "strapi-plugin-content-type-builder": "3.4.6",
    "strapi-plugin-documentation": "^3.5.2",
    "strapi-plugin-email": "3.4.6",
    "strapi-plugin-graphql": "^3.5.2",
    "strapi-plugin-upload": "3.4.6",
    "strapi-plugin-users-permissions": "3.4.6",
    "strapi-provider-upload-cloudinary": "3.4.6",
    "strapi-utils": "3.4.6",

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:

  1. Update package.json file to include the same version for all Strapi maintained packages.
  2. Ran npm install --package-lock-only to update the lock file
  3. Ran npm install after deleting the node_modules folder
  4. Rebuilt admin with npm run build

Any other ideas? :frowning:

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 test@test.com 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?