Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strapi CMS third level populating

I have a problem with fetching third level data from Strapi CMS.

My Structure is the following:

Page > Content(Dynamic Zone) > Multiple Entitys e.g. HeroSliderElement.

So Calling this URL from Postman:

{{protocol}}://{{host}}:{{port}}/api/pages?populate[Content][populate]=*

But since inside my HeroSliderElement are images i have the problem, that i dont get these back.

Request Detail There should be the media data linked from the CMS:

enter image description here

Does anyone have an Idea how to fix this? Any help is appreciated!

I am currently using the following versions of packages:

  "dependencies": {
"@strapi/plugin-i18n": "4.0.7",
"@strapi/plugin-users-permissions": "4.0.7",
"@strapi/provider-upload-aws-s3": "^4.1.0",
"@strapi/strapi": "4.0.7",
"pg": "8.6.0",
"strapi-provider-upload-aws-s3": "^3.6.8"

},

like image 308
SupaMario Avatar asked Jul 18 '26 17:07

SupaMario


2 Answers

Install the official strapi plugin : strapi-plugin-populate-deep , its easy and great plugin for nested content structure, it worked for me.

Examples: Populate a request with the default max depth.

/api/articles?populate=deep

Populate a request with the a custom depth

/api/articles?populate=deep,10

Populate a request with the a custom depth

/api/articles/1?populate=deep,10
like image 73
Code_Warrior Avatar answered Jul 21 '26 06:07

Code_Warrior


In case you're still looking for a solution, refer to answer here - Strapi V4 populate dynamic zones media not populating

like image 20
Rodrigo Rubio Avatar answered Jul 21 '26 06:07

Rodrigo Rubio