Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Content Fragment Model - Not replace externalPreviewUrlPattern property

Avatar

Level 2

Hi,
I am experiencing a problem:
I would need to not override this property "externalPreviewUrlPattern" present on the Content fragment model when performing a deployment in environment.
In general, the models must be replicaced but only that property should not be replaced.
I tried to apply the following filter inside the ui.content module’s filter.xml but it doesn't work:

 

<workspaceFilter version="1.0">
<filter root="/conf/myProject/settings/dam/cfm/mymodel" mode=replace>
<exclude pattern="/conf/myProject/settings/dam/cfm/mymodel/externalPreviewUrlPattern"/>
</filter>
</workspaceFilter>

 

any suggestions?

Thanks!!

Topics

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

1 Reply

Avatar

Level 2

It seems like you are working with AEM (Adobe Experience Manager), and you are trying to deploy content fragments to a target environment without overriding a specific property (externalPreviewUrlPattern) within the content fragment model. Based on the filter approach you're using, you're on the right track, but there may be a slight misunderstanding about how the filter.xml is applied. Let’s go over the solution and ensure it works as expected.

Problem Breakdown:

You want to:

  • Replicate the content fragment models from one environment to another (as usual in AEM).

  • Exclude the externalPreviewUrlPattern property from being overridden during the deployment.

Suggested Solution:

In AEM, the filter.xml inside the content package defines what content will be included or excluded during deployment. Your current approach seems mostly correct, but there are a couple of things to check:

  1. Ensure correct syntax in the filter.xml file.

  2. Use the correct paths to reference the node/ property.

  3. Verify the deployment mode to ensure it aligns with the correct behavior.

Corrected and Detailed Filter Example:

First, make sure that the path you're using to specify the property is correct and points to the exact property in the content fragment model.

<workspaceFilter version="1.0">
    <filter root="/conf/myProject/settings/dam/cfm/mymodel" mode="replace">
        <!-- Exclude the property externalPreviewUrlPattern from being replaced -->
        <exclude pattern="/conf/myProject/settings/dam/cfm/mymodel/externalPreviewUrlPattern"/>
    </filter>
</workspaceFilter>

Key Points:

  1. mode="replace" – This means that all content under the specified path (/conf/myProject/settings/dam/cfm/mymodel) will be replaced. To avoid overriding specific properties, we are excluding them.

  2. <exclude pattern="/conf/myProject/settings/dam/cfm/mymodel/externalPreviewUrlPattern"/> – This line tells the deployment process to exclude the externalPreviewUrlPattern from being replaced. You must ensure that the path is exactly correct. If it's a property inside the model (like externalPreviewUrlPattern), the path should point to the property, not just the model node.

Additional Considerations:

  • Property vs Node: Ensure that externalPreviewUrlPattern is indeed a property and not a child node. If it's a node, the pattern would need to specify that as well (e.g., /conf/myProject/settings/dam/cfm/mymodel/externalPreviewUrlPattern/*).

  • Deployment Mode: Check if the mode="replace" is causing unintended overwrites for other parts of your content. You can also try using mode="merge" if you don't want to completely replace the model but only update parts of it.

Testing the Solution:

  1. Test on Staging: Test your filter.xml in a staging environment before applying it to production.

  2. Verify Exclusions: After the deployment, verify that the externalPreviewUrlPattern property is not overwritten, while other model properties are updated as expected.

Summary:

  • The filter.xml syntax you are using is mostly correct.

  • Ensure the correct path to the property and confirm that it's a property (not a node).

  • If the problem persists, you may also want to experiment with changing the deployment mode to merge or double-check your model paths.

Let me know if this resolves the issue or if further adjustments are needed! Have a great night!
- Shaka