AEM 6.5 core js throws error on dialog open, expects action attribute on .cq-dialog (all.js, line 166) | Community
Skip to main content
February 7, 2020
Solved

AEM 6.5 core js throws error on dialog open, expects action attribute on .cq-dialog (all.js, line 166)

  • February 7, 2020
  • 1 reply
  • 1671 views

In line 166 of all.js, there needs to be a check for the action attribute before it tries to get a string match of its value.

This is the existing fragment of code in all.js, line 166:

 

if (!(0 > c(".coral-Form.cq-dialog").attr("action").indexOf("sticky_menu"))) {

 

which throws this (blocking) error:

 

Uncaught TypeError: Cannot read property 'indexOf' of undefined at HTMLDocument.<anonymous> (all.js:166)

 

Instead, the line should check that c(".coral-Form.cq-dialog").attr("action") exists before getting its value, like this:

if (c(".coral-Form.cq-dialog").attr("action") && !(0 > c(".coral-Form.cq-dialog").attr("action").indexOf("sticky_menu"))) {

 

I'm not sure if this error surfaced based on something we've developed, but there should be a check that the element has an attribute before determining its value.

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

Can you log a daycare ticket with steps to reproduce the issue on a plain AEM instance and we can check internally.

1 reply

user05162Adobe EmployeeAccepted solution
Adobe Employee
February 7, 2020

Can you log a daycare ticket with steps to reproduce the issue on a plain AEM instance and we can check internally.