Expand my Community achievements bar.

SOLVED

CQ5.5 form start component overlayed not working on publish

Avatar

Level 1

We are migrating from CQ5.4 to CQ5.5. We have customized form which overlays /libs/foundation/components/form/start. In the CQ5.4 for publish instance, anonymous user has read access on apps and libs folder which are not there in CQ5.5 for security reasons. When we try to use the same form component in publish in CQ5.5, forms based on our component does not work. If the anonymous user is given read permission on over form component, everything starts working. Is there any dependency of read access on form to work.

 

 

How can Adobe reproduce the issue themselves, step-by-step?!

 

All the activities are to be done on publish CQ5.5 1. Create StartForm in apps/project1/components folder.

2. Copy contents of start.jsp from the /libs/components/form/start/start.jsp and paste it to startform.jsp. This makes the script same but name different.

3. Provide title=custom form and component group = test 4. Provide sling:resourceSuperType = libs/components/form/start 5. Drag and drop this so that form is created. Now drop text component from form group to this form. Enable the required property and message.

6. Customize form by dialog and provide store action.

7. Customize the end part of the form and enable submit button.

8. Click submit button. This does not cause the form to be submitted, no validation happens and forward happens.

9. Now go to user admin and provide read access to startform component.

10. Retry submit, now everything works fine.

 

In sum, due to absence of read access on startform in CQ5.5, form does not get submitted. Once the access is given, the form works. Is there any dependency when we overlay form start and provide resourceSuperType?

1 Accepted Solution

Avatar

Correct answer by
Level 1

We've solved the problem so I'm posting the answer for other people's benefit.

If you have a custom form in /apps and it extends foundation/components/form/start, then the form instance node created needs to have the sling:resourceSuperType set to "foundation/components/form/start". The way to get this auto-created is to create a cq:editConfig/cq:formParameters under your form component (in /apps). In that, set a parameter called sling:resourceSuperType to "foundation/components/form/start". That will autocreate the property when the form instantiated. Any component that has an embedded form component in it will have to get the property created via a cq:template node under the component but make sure the correct node structure of the form node is there. 

All the best.

Sarwar

View solution in original post

1 Reply

Avatar

Correct answer by
Level 1

We've solved the problem so I'm posting the answer for other people's benefit.

If you have a custom form in /apps and it extends foundation/components/form/start, then the form instance node created needs to have the sling:resourceSuperType set to "foundation/components/form/start". The way to get this auto-created is to create a cq:editConfig/cq:formParameters under your form component (in /apps). In that, set a parameter called sling:resourceSuperType to "foundation/components/form/start". That will autocreate the property when the form instantiated. Any component that has an embedded form component in it will have to get the property created via a cq:template node under the component but make sure the correct node structure of the form node is there. 

All the best.

Sarwar