Change the value of component in one content type, changes in same component in another content type

System Information
  • Strapi Version - v4.1.11:
  • Operating System - Windows 10:
  • Database - MySQL:
  • Node Version 14.19.0:
  • NPM Version 6.14.16:
  • Yarn Version:

Entities in discussion

  • Component - Featured Media
  • Single types - About
  • Collection type - Sectors

When I’m entering the data for the About single type, I get to choose the values for the “Featured Media” component which is part of it. However, when I save the data, it changes the values for the component present inside the entries for the “Sector” collection type as well.

I created and used the “Featured Media” component so the data structure remains the same, but values should differ. What I expected to have was sector[0].featuredMedia.desktopView and about.featuredMedia.desktopview should have different values.

Is there anything am doing wrong? Please guide me to proceed further, thank you!

Can you try to put a different name in the component.e.g. featureMedia in about and featuresMedia in sector component.(or any other name you come up with)

Hello @Meher_Chandan, thank you for your response.

As you suggested I changed the component name in its respective collection/single type. However, I changed it for the 1st level component. In the case shared above, I renamed clientTestimonials to aboutClientTestimonials and accessed featuredMedia component from that.

Because when I change it for the internal component, it changes everywhere that component is integrated…

May be I am not able to explain properly. When you use a component within a component(in your case featureMedia is used inside clientTestimonials), it ask for a name you want to put within that component and the component itself.
let me give you an example what I have. So here is the component which uses pricing component

Now when I click on the pricing component, I see below screen

Here the name of the component is pricing(which is displaying under select a component) and the name which is being used in the asset pricing is also pricing(displaying under Name field). I was asking you to change the name (in Name) field under one of the component.
Also on another note, please check your collection names in schema files if its not duplicated.