Expand my Community achievements bar.

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

On adding parsys for a component not able to delete the component in AEM 6.4

Avatar

Level 3

v

Hi,

I have a component as below:

<a data-sly-use.button="we.retail.core.model.Button"

   class="btn btn-primary btn-action cq-dd-linkTo ${button.cssClass}"

   href="${button.linkTo == '#' ? '#' : button.linkTo @ extension = 'html'}" role="button">${properties.label}</a>

  <div data-sly-resource="${'par' @ resourceType='wcm/foundation/components/parsys'}"/>

1671851_pastedImage_0.png

Once the component is added in page, if i try to delete it there is the error in console and component is not deleting.

1671852_pastedImage_1.png

But if i add a div above parsys in  html,

   <div>

  <div data-sly-resource="${'par' @ resourceType='wcm/foundation/components/parsys'}"/>

  </div>

the component can be deleted.

But while editing, one child div editable structure is shown while authoring.

parent div authoring view:

1671853_pastedImage_2.png

child one (showing due to addition of <div> above parsys):

1671857_pastedImage_3.png

We don't need the child editable authoring view.

NOTE: code without additional <div> works fine in AEM 6.1

smacdonald2008 Arun Patidar can you kindly help with this?

Thanks in advance!!

Thanks,

Sundari.

7 Replies

Avatar

Level 10

The child node of parsys with specified name 'par' is not created until you add a component inside the parsys. That's the default behavior of parsys. In this case, its throwing error because of missing child component and unable to locate the path of parsys which you have seen in console logs. Once you have added child component, the parent container allows the parsys to be deleted without any issue. This could probably be a bug. You may log a ticket for same.

If you add unbalanced div tag, that would break DOM structure and create other issues.

Temporary workaround - Drop a component inside parsys and then delete it, per your use case, till the time you get a fix from customer care.

Avatar

Level 3

Hi gauravd83019631 ,

Thanks for the reply!!

I tried your workaround by adding some component in parsys (hence the node "par" will be created). Once I delete the whole component it disappears from the page. However, on refresh of the page, the component is again visible. (the component is not deleted from CRX)

Added an image component in child parsys.

1672285_pastedImage_0.png

When I delete the component, it disappears from the page.

If I refresh the page again, the component is visible.

1672292_pastedImage_1.png

However, the child "image" component has been deleted.

Kindly help on this one.

Thanks,

Sundari.

Avatar

Level 10

I would recommend to log a ticket wit daycare and ask for the patch.

You could obviously overlay '/libs/cq/gui/components/authoring/editors/clientlibs/core.js'  & fix it, if that's critical. This doesn't seem to be a showstopper for authors to continue. The developers could delete it from /crx/de as and when required.

Avatar

Level 1

Hi sundarig90868210

We have exactly the same issue in our project!

Did you get a solution for this?

We created a daycare ticket but we were not able to reproduce this issue on a plain 6.4.3 instance.

Is it possible that the issue only occurs on upgraded instances?

Thanks,

Mike

Avatar

Level 1

Hey @sundarig9086821 ,

 

Did you found the solution?

 

Thank You!

Avatar

Level 1

Hi @sundarig9086821 

Did you found any solution, I see the same error in AEM 6.5.4

Avatar

Level 1

I know it is an old issue but see some messages still asking for this. You can configure the edit options for the child adding the _cq_childEditConfig.xml file and configure there in the same way that the  _cq_editConfig.xml file. 
For example:

<?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"
          cq:actions="[edit]"
          jcr:primaryType="cq:EditConfig">
</jcr:root> 


This configuration will display just the edit button for the child components 
Regards!