I'm deploying some changes to an existing Experience. For the Network
metadata, I get this error
Image optimization is available only for sites that use Salesforce's CDN for Digital Experiences
This error did not occur when deploying from dev - > integration -> staging
; only from staging -> PROD
If I look at the XML in the source org (actually the source branch corresponding to Staging org), I see:
<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
How do I resolve this error in the deployment to PROD?
Best Answer
The metadata item
<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
was added in V56 of the MDAPI for metadata type Network.Per the CDN doc, Salesforce CDN is auto-enabled for orgs with enhanced domains enabled. Well, my dev, integration, and staging orgs have been auto-enabled for Enhanced Domains as of Winter 23 but the PROD org is not yet on Enhanced Domains.
This means one has four choices:
enableImageOptimization
was added in V56false
and deploy again at V56. Once PROD is enabled for Enhanced Domains, then revert VCS branch(es) back to<enableImageOptimizationCDN>true</enableImageOptimizationCDN>
. If done in the promotion branch, VCS can still represent what is in the org during the interim period. Themain
branch can be refreshed in v57 when Enhanced Domains take effect in all orgs (unless postponed via opt-out)Network
metadata at all - this works for updates to existing Experiences where the delta in XML forNetwork
between your source org and PROD org may be irrelevant