EditConfig Listener not working in nested components in aem 6.4

Avatar

Avatar
Give Back
Level 2
RajaZeus
Level 2

Likes

3 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
RajaZeus
Level 2

Likes

3 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 3
Boost 1
View profile
RajaZeus
Level 2

20-03-2019

Hi All,

We are having two components lets say Component A and Component B. Both have its own editConfig Listeners for afterinsert and afteredit to refresh the current page.

It is working fine when both the components are used individually, but there seems to be an issue when we include component A inside component B using data-sly-resource, after inserting the component the page is not refreshed and the component is non editable. We have to manually refresh the page and after that the component functions normally where both the components get enabled for editing. Has anyone faced the same issue? we are using the version 6.4 with service pack 2.(6.4.2).

Thanks,

Raja S

Replies

Avatar

Avatar
Boost 1
Level 1
Rohini_N
Level 1

Like

1 like

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
Rohini_N
Level 1

Like

1 like

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
Rohini_N
Level 1

28-03-2019

Yes, even I 'm facing the same issue. I have to either do hard refresh or change modes (Moving from edit to preview and then back to edit mode) to solve this issue. Someone please suggest any other approach to solve.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

28-03-2019

Is the outer component the responsive grid?

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

28-03-2019

Also best practice to model your components based on the core components.

Avatar

Avatar
Give Back
Level 2
RajaZeus
Level 2

Likes

3 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
RajaZeus
Level 2

Likes

3 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 3
Boost 1
View profile
RajaZeus
Level 2

28-03-2019

Yeah Scott correct, we are wrapping all the components inside the responsive grid.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

28-03-2019

You can try below:

In the cq:editConfig node of component A (which I understand to be the inner component), change Listener from REFRESH_SELF or REFRESH_PAGE  to  REFRESH_PARENT

e.g. afteredit="REFRESH_PARENT"

This will force the parent component B to refresh when editing component A.

Avatar

Avatar
Give Back
Level 2
RajaZeus
Level 2

Likes

3 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
RajaZeus
Level 2

Likes

3 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 3
Boost 1
View profile
RajaZeus
Level 2

28-03-2019

Thanks for chiming in Arun, i have tried that option already and it does not seem to solve the issue.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

28-03-2019

Hi,

I tried in AEM 6.4, working for me.

I used REFRESH_PAGE action for both components, it is refreshing the page and I am able to edit both components.

chrome-capture.gif

Please let us know if we are missing something here.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

28-03-2019

Excellent reply Arun!