acs-aem-commons icon indicating copy to clipboard operation
acs-aem-commons copied to clipboard

Embed Component returning null value when Request Parameter is not passed

Open anand-morais opened this issue 2 years ago • 1 comments

Required Information

  • [ ] AEM Version - 6.5 , Including Service Packs - 6.5.11
  • [ ] ACS AEM Commons Version: 5.1.0
  • [ ] Reproducible on Latest? Yes

Expected Behavior

When using embed component to load marketo forms if the request parameter or Javascript variable is not passed then empty value should be returned instead of null.

Actual Behavior

We are using embed component in our page to load the Marketo Forms. When we are trying to set Hidden value and set value in Marketo form . We have noticed that If request Parameter or Javascript Variable is not present , then it is returning null instead of empty . On form submission , this null value is getting submitted to the Marketo server.

Steps to Reproduce

  1. Create a Vanilla AEM 6.5 Instance
  2. Install SP 6.5.11
  3. Install ACS Commons version 5.1.0
  4. Goto Tools -> Cloud Services -> Marketo
  5. Add marketo instance configurations
  6. Create a new page under Sites
  7. Add the embed component to the page
  8. Edit the component
    1. Select a Marketo Form to load in the page
    2. Select values tab
    3. Select Set Value
      1. Select a field name from the dropdown
      2. Select Request Parameter as value source
      3. Input the desired value
  9. Save the component
  10. Try to load the form without sending the request parameter

anand-morais avatar Jan 11 '23 07:01 anand-morais

@anand-morais do you happen to have a PR that fixes this? im not too familiar w this component.

davidjgonzalez avatar Jan 20 '23 20:01 davidjgonzalez