Issue in Dynamic Zone

System Information
  • Strapi Version: 4.0.0
  • Operating System: macOS Monterey
  • Database: PostgreSQL
  • Node Version: 16.1.0
  • NPM Version: 8.1.4
  • Yarn Version: 1.22.15

Hello!

I’m migrating my company’s website from Strapi 3.0 to 4.0 and ran into an issue with the Dynamic Zone. I’ve got two components:

  • Text Section (which has a string title and richtext description)
  • List Section (which has a string title and a repeatable “content” component that has a string “content” inside)

Adding a List Section in the dynamic zone is okay, but when I add a Text Section it breaks with the following error:

[2021-12-12 13:21:06.597] error: Invalid populate field. Expected a relation, got richtext
Error: Invalid populate field. Expected a relation, got richtext
    at Object.processPopulate (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/query/helpers/populate.js:83:13)
    at Object.processState (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/query/query-builder.js:235:32)
    at Object.getKnexQuery (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/query/query-builder.js:271:12)
    at Object.execute (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/query/query-builder.js:352:25)
    at Object.applyPopulate (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/query/helpers/populate.js:566:12)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.execute (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/query/query-builder.js:357:11)
    at async Object.findOne (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/entity-manager.js:118:22)
    at async Object.update (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/database/lib/entity-manager.js:254:22)
    at async Object.update (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/strapi/lib/services/entity-service/index.js:219:18)
    at async Object.<anonymous> (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/strapi/lib/services/entity-service/index.js:67:20)
    at async Object.update (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/plugin-content-manager/server/controllers/collection-types.js:123:27)
    at async returnBodyMiddleware (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/strapi/lib/services/server/compose-endpoint.js:52:18)
    at async module.exports (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/plugin-content-manager/server/middlewares/routing.js:39:3)
    at async policiesMiddleware (/Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/strapi/lib/services/server/policy.js:24:5)
    at async /Users/lazarnikolov/projects/strapi-four/node_modules/@strapi/strapi/lib/middlewares/body.js:24:7

Any clues on what could be wrong? In v3 this structure worked just fine.

Thanks,
Lazar Nikolov

2 Likes

@lazar any solution you found for v4?

Not really, no :confused: