Expand my Community achievements bar.

Dynamic Media Component: Loss of Custom Fields After Media Addition

Avatar

Level 4

Hi Everyone,

 

I created a dynamic component in my project by inheriting from dam/components/scene7/dynamicmedia using sling:resourceSuperType to utilize the core functionality of the Dynamic Media component. Initially, everything worked as expected; I added custom fields to the dialog, and after dragging and dropping the Dynamic Media component onto my page, I could see the dialog changes reflecting these custom fields. The resource type correctly pointed to my component (projectName/components/dynamicmedia).

 

However, after adding an image or video to the Dynamic Media component, I encountered an issue: my custom fields disappeared from the dialog, and the resource type reverted to /libs/dam/components/scene7/dynamicmedia. As a result, I lost my custom fields, and the component began pointing to the core component from which I originally inherited.

Could you please help me resolve this issue?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Community Advisor

can you please provide the .content.xml details

Wrapper Component Definition (ui.apps/src/main/content/jcr_root/apps/projectName/components/dynamicmedia/.content.xml)

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Component"
jcr:title="Custom Dynamic Media"
sling:resourceSuperType="dam/components/scene7/dynamicmedia"
componentGroup="Custom Components"/>

Avatar

Administrator

@imadullakhan Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni