Barelydead / strapi-plugin-populate-deep

A Strapi plugin that makes it easier to populate deep content structures
172 stars 39 forks source link

Different components with the same field names override eachother #28

Open Bodokh opened 1 year ago

Bodokh commented 1 year ago

Let's say if have for example 4 components: Component A and B - Child components Component P1 and P2 - Parent components

component A fields:

component B fields:

Component P1 and P2: These 2 components wrap component A and B respectively using the same field name as an input for components A and B.

When making the request to an entity with the deep populate, the image will not be populated. It depends of the order the components were added. The populate will use the last component added.

As a workaround, when working with component nesting when the parent component has the same field name, we need to make sure that each field name is unique

Freyb commented 1 year ago

Hey @Bodokh I just created PR #31 that fixes the issue