Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

beforeinsert / beforechildinsert cq:listener does not fire up

Avatar

Former Community Member

Hi!

I have the following cq:editConfig file:

<?xml version="1.0" encoding="UTF-8"?><jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"    jcr:primaryType="cq:EditConfig"><cq:listeners        jcr:primaryType="cq:EditListenersConfig"        afteredit="REFRESH_PAGE"        beforeinsert="function (){ return OrderModule.prototype.checkCountBeforeAdd(); }"        beforedelete="function (){ return OrderModule.prototype.checkCountBeforeRemove(); }"            /></jcr:root>
'beforedelete' event is fired up ok, but 'beforeinsert' doesn't not fire up, 'beforechildinsert' neither.

Could you please direct me to the correct direction?

 

Thank you in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

You need to install service pack & couple of hotfix. Please wait till sp3 or file a support request.

View solution in original post

3 Replies

Avatar

Level 10

Are you seeing any JS error, Did you tried adding a console log statement to confirm?

Avatar

Correct answer by
Level 10

You need to install service pack & couple of hotfix. Please wait till sp3 or file a support request.

Avatar

Former Community Member

Thank you for your answer!

Yesm I have console.log() in checkCountBeforeAdd() function

   checkCountBeforeAdd : function() {
            console.log("checkCountBeforeAdd");

 

But I do not see any logs nor errors in console.