Expand my Community achievements bar.

Rich text RTE out of the box validation bug

Avatar

Level 4

Hi,

I have an issue when using the rich text input field (cq/gui/components/authoring/dialog/richtext) in a dialog. Notice that I am using the rich text input field as a field of the dialog itself and not as in-place editor.

The bug happens when I am trying to add a hyperlink through the link plugin. The value of the hyperlink is required, but even if I press cancel (so I don't really add the link), the validation still occurs and I can't submit the whole dialog. I reproduced this bug on a clean AEM instance version 6.3.1.1. Do you know how to solve this issue?

I am also adding the steps to reproduce the bug.

dialog definition overview:

1406262_pastedImage_3.png1406263_pastedImage_4.png

dialog initial state:

1406369_pastedImage_5.png

select text and press on the hyperlink plugin

1406370_pastedImage_6.png

I do not add the link and press cancel (X)

I try to submit the form, but nothing happens. Probably the validation of the whole form returns false.

6 Replies

Avatar

Administrator

Do you have separate Validation for RTE and main dialog?

These validations will be triggered when the dialog submit button is clicked. It will stop the dialog submit event first, scan through the dialog to look for fields with a validator, validate those fields and show errors, if any. If all fields are valid, it will proceed with the dialog submit event otherwise not.The  selector property ties the validator to the form elements on the page.

Good Read:- http://keysandstrokes.info/aem-touch-ui-richtext-validations/



Kautuk Sahni

Avatar

Level 4

What do you mean by separate validation? Maybe you mean custom validation?

I do not have any custom validation though, everything was tested on a vanilla instance.

The problem is that when I close the dialog of the pathbrowser of the hyperlink plugin by clicking cancel (X), the validation of the whole dialog should not consider the pathbroswer anymore (as I understand). But the validation of the dialog still calls the validation of the pathbrowser.

Avatar

Level 4

Sorry but I don’t get why that’s the correct answer. I did not marked any input field as required. The pathbrowser of the link plugin of rich text editor is required by default. Why should I write a custom validator?

Avatar

Level 10

I have asked our Touch Ui team to look here to confirm if this is a bug.

Avatar

Level 10

Looks like this could be a bug after hearing back. Please open a tocket

Avatar

Level 2

Did you find the solution? I can reproduce it in some components dialogs, but I cannot reproduce it in all dialogs. It's really strange