AEM Forms reCAPTCHA Site Key missing on Preview environment
This article explains how to resolve an issue where the reCAPTCHA Site Key is missing from forms on the AEM as a Cloud Service Preview environment, which prevents form submission.
Description description
Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS) Forms
Symptoms
- When using AEM Forms on AEM as a Cloud Service, forms may work correctly on Author and Publish environments, but fail to submit on the Preview environment due to a missing reCAPTCHA Site Key.
- In this scenario, the Site Key is present in the form’s
model.jsonresponse on Author and Publish, but is absent on Preview. As a result, reCAPTCHA validation fails and form submission is blocked. - This issue typically occurs when the required reCAPTCHA cloud configuration hasn’t been explicitly deployed to the Preview environment, or when the Preview environment is serving a cached version of the form without the Site Key.
Resolution resolution
Follow the steps below to resolve the issue:
- Check the form’s
model.jsonresponse on Author, Publish, and Preview environments to confirm the Site Key is present on Author and Publish, but missing on Preview. - Ensure that the reCAPTCHA cloud configuration has been explicitly deployed to the Preview environment. Cloud configurations aren’t automatically published to Preview when publishing a form; use the appropriate deployment process or replication agent for Preview.
- Deploy the required reCAPTCHA cloud configuration to the Preview environment using your standard configuration deployment process or pipeline. Monitor deployment logs to confirm successful application of the configuration.
- If the Site Key is still missing after deployment, perform a targeted cache purge for the affected form’s
model.jsonURL in the Preview environment. - Open the Preview form in a private or incognito browser window, and reload it. Confirm that the
model.jsonnow includes the Site Key, and submit the form to verify that reCAPTCHA validation works.
recommendation-more-help
experience-cloud-kcs-help-kbarticles