sundarig9086821
sundarig9086821
19-01-2019
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'}"/>
Once the component is added in page, if i try to delete it there is the error in console and component is not deleting.
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:
child one (showing due to addition of <div> above parsys):
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.
Gaurav-Behl
MVP
Gaurav-Behl
MVP
19-01-2019
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.
sundarig9086821
sundarig9086821
20-01-2019
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.
When I delete the component, it disappears from the page.
If I refresh the page again, the component is visible.
However, the child "image" component has been deleted.
Kindly help on this one.
Thanks,
Sundari.
Gaurav-Behl
MVP
Gaurav-Behl
MVP
21-01-2019
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.
mikes22421318
mikes22421318
18-02-2019
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
Yochaubs
Yochaubs
29-04-2020