Hey all,
I've encountered a weird issue on 4 separate templates that I use. I have several parsys set up so our editors can add text fields/images etc. As far as I can tell, no changes have been made to these templates in awhile. I'm trying to just out of the box AEM functions as well.
<div class="header__subtitle" data-sly-resource="${'header-text' @ resourceType='foundation/components/parsys'}">
</div>
<div class="body__lead summary" data-sly-resource="${'body-lead' @ resourceType='foundation/components/parsys'}">
</div>
<div class="body__main">
<div data-sly-resource="${'body-paragraph' @ resourceType='foundation/components/parsys'}">
</div>
</div>
<div class="body__form">
<h3 class="body__form__header">Request an Appointment Today!</h3>
<div data-sly-resource="${'body-form' @ resourceType='foundation/components/parsys'}"></div>
</div>
These all worked perfectly until a day or two ago. Suddenly all these parsys have disappeared. The lines are very tiny, there is no drag components here option. I can click on them to add a text component, but when I do that nothing shows up. Refreshing the page does nothing but checking through crx/de I can see that the text was added properly. They are taking the width of their parent div as expected, but they seem to have lost the height. The existing components are still there and are registering with the correct dimensions. I would think that it could be some minor change to a css class, but this happened in many different templates and they are all doing this. In total, there are 5 parsys to the page and all 5 have shrunk and do not do anything when you add something to them.
I checked the logs/console and I don't see anything super telling. Can someone tell me where to start to troubleshoot this? Heres what they look like.
Heres the config from crx/de. The text is showing up but all the other text_ are nowhere to be found
and lastly, the parsys component itself. all of them have the same sling:resourceType
Thanks for the help with this!
Solved! Go to Solution.
Please add init.jsp in your file and it will resolve your problem.
One other thing that may help. I went into crx/de and added a Text property to one of those text boxes that aren't showing up, and I was able to get that to show up. It styled correctly, and was okay. Then when I tried to delete it I got this message in the console. Adding a new text component did not show this message.
core.min.js:4220 Uncaught TypeError: Cannot read property 'sling:resourceType' of undefined
at new a.history.actions.DeleteParagraph (core.min.js:4220)
at n (core.min.js:5794)
at l (core.min.js:7234)
at Object.k [as doBulkOperation] (core.min.js:7240)
at Object.<anonymous> (core.min.js:5801)
at Object.<anonymous> (jquery.min.js:832)
at cd (jquery.min.js:786)
at Object.fireWith [as resolveWith] (jquery.min.js:819)
at Object.i.(anonymous function) [as resolve] (https://author-prod.envisionhealth.info/etc.clientlibs/clientlibs/granite/jquery.min.js:846:37)
at l (core.min.js:7239)
Please add init.jsp in your file and it will resolve your problem.
This worked! Thank You Prince
Dear @Prince_Shivhare,
In my site, I create component contentABC. In the contentABC.html, I include the parsys as below:
<div class="abc-wrapper" data-position-desktop="${ properties.desktopTextAlignment }" data-sly-resource="${ 'par' @ resourceType = 'wcm/foundation/components/parsys' }"> </div>
The component contentABC can add other component.
I was tried include the init.jsp file : <sly data-sly-include="/libs/wcm/core/components/init/init.jsp" />
I tried to add init.jsp to the head.html, I also tried to add init.jsp to the contentABC.html but the parsys still error with drag component icon as below.
Please help me, How to fix it? The drag icon too small and it difficult for use.
And I have another question. In the component contentABC, I want to limit the number of icon can add in to that. Ex: limit 2 components, the user can not add more than 2 components. How to do that?
Thanks you so much,
BienHoang
Views
Replies
Total Likes
Hi @Prince_Shivhare
I have added the init.jsp file into my component HTML. File still I am not able to resolve this issue.
Views
Replies
Total Likes
Thanks Prince! I included this statement in my head.html and it appears to have fixed it.
<sly data-sly-include="/libs/wcm/core/components/init/init.jsp" />
Excellent answer Prince!!!
This worked. Thanks