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.json response 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:

  1. Check the form’s model.json response on Author, Publish, and Preview environments to confirm the Site Key is present on Author and Publish, but missing on Preview.
  2. 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.
  3. 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.
  4. If the Site Key is still missing after deployment, perform a targeted cache purge for the affected form’s model.json URL in the Preview environment.
  5. Open the Preview form in a private or incognito browser window, and reload it. Confirm that the model.json now includes the Site Key, and submit the form to verify that reCAPTCHA validation works.
recommendation-more-help
experience-cloud-kcs-help-kbarticles