diff --git a/src/main/archetype/all/pom.xml b/src/main/archetype/all/pom.xml index 5552a2700..8db74e10f 100644 --- a/src/main/archetype/all/pom.xml +++ b/src/main/archetype/all/pom.xml @@ -194,7 +194,7 @@ /apps/${appId}-vendor-packages/application/install #end -#if ( $includeExamples == "y" and ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") ) +#if ( $includeExamples == "y" and ( ($includeForms == "y" or $includeFormsenrollment == "y" or $includeFormscommunications == "y" or $includeFormsheadless == "y") and $aemVersion == "cloud" ) ) com.adobe.aem core-forms-components-examples-apps diff --git a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml index 3c2673b69..fc7af05cc 100644 --- a/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml +++ b/src/main/archetype/ui.content/src/main/content/jcr_root/conf/__appId__/settings/wcm/template-types/af-page-v2/structure/.content.xml @@ -3,6 +3,7 @@ jcr:primaryType="cq:Page"> + sling:resourceType="${appId}/components/page" + guideComponentType="fd/af/templates"> diff --git a/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx b/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx index 7b32126d4..537a61618 100644 --- a/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx +++ b/src/main/archetype/ui.frontend.react.forms.af/src/Form.tsx @@ -17,7 +17,9 @@ export const getId = () => { let id = "" if (!process.env.FORMPATH) { const parent = document.querySelector(".cmp-formcontainer") - id = parent.getAttribute("data-form-id") + if (parent) { + id = parent.getAttribute("data-form-id") + } } else { id = base64url(process.env.FORMPATH) }