Rich text RTE out of the box validation bug | Community
Skip to main content
Level 4
January 30, 2018

Rich text RTE out of the box validation bug

  • January 30, 2018
  • 2 replies
  • 6942 views

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:

dialog initial state:

select text and press on the hyperlink plugin

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

kautuk_sahni
Community Manager
Community Manager
January 31, 2018

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
boser87Author
Level 4
January 31, 2018

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.

boser87Author
Level 4
January 31, 2018

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?

smacdonald2008
Level 10
January 31, 2018

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

smacdonald2008
Level 10
January 31, 2018

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