AEM ClientLib Loading Issue: clientlib Not Loading During New Page Creation
Hello,
I'm developing a client library named image.editor and including it in the extraClientlibs list for page properties and component.
This client library uses the dialog-loaded event to retrieve image alternative text from DAM assets.
The implementation works correctly when:
1. Editing a component dialog.
2. Editing page properties of an existing page.
However, it fails to load and execute when creating a new page.
I've observed that the clientlib .js file is not loaded during the new page creation process, whereas it loads successfully when editing an existing page.
The extraClientlibs list on the page includes:
cq.common.wcm
core.wcm.components.page.v3.editor
cq.wcm.msm.properties
granite.contexthub.configuration
cq.siteadmin.admin.properties
core.wcm.components.image.v3.editor
image.editor
Is there something I might be missing, or is it generally not recommended to include a custom clientlib like this in the page's extraClientlibs for dialog functionality?
Any suggestions would be greatly appreciated. Thank you!