May 15, 2020
Estimated Post Reading Time ~

Component Group not visible in AEM Sidekick

Component Group not visible in AEM Sidekick
In this post, I will address a common issue which we face when we create a component with a new group.
Sometimes it happens that we create a component using CRXDE Lite and defined a new group there & when we go to our web page sidekick in design mode, we are not able to see this component group there.
Most AEM developers are suffering from this common issue and we are not able to find why this group not visible in the sidekick. In this post, I will show you what common mistake we did while we create a component using CRXDE Lite. So

Agenda
1). Why Component group not visible in sidekick?
2). How to resolve this issue?
3). How to make it work as it is i.e. without changing in the component?

NOTE: –
This problem is present in CQ5.x as well as AEM6 so it’s solution work for all CQ5.x and AEM6 version.

For addressing this issue I just create a new component with these properties –


Everything is looking right but when I go to your web page sidekick in edit mode, click on parsys edit button, in this list are not able to see this component group.

Cause of this issue.
My finding tells that jcr:title property started with a small letter, So that it’s not visible in a sidekick.

Solution
Just change this property value “blog” with “Blog” & again go to your web page. First clear your browser cache, then refresh your web page. goto sidekick. Here it is, your component is visible here.

Convention to create new Component According to my findings
As you see there are a lot of groups present in sidekick, all are started with a capital letter, so you just follow this assumption while creating a new component –

1). Keep jcr:title property values Starting with a capital letter. It’s a mandatory property for displaying this component group in the sidekick.
2). Keep componentGroup property starting with capital letter, while it’s not mandatory but for displaying it in sorted order in the sidekick, it’s good to have it. if you don’t define this property then this component will be visible under “NO GROUP DEFINED!” component group.

How to make it work without changing these properties?

Some of my colleagues ask me that we don’t want to change these properties then how to use this component group.
Answer is when you select a group from sidekick then it’s value will be stored at template node under design page jcr:content node. This design page property is a template level property and present at jcr:content node of your template. If you don’t define this property then AEM create a nt:unstructured node under /etc/designs/default/jcr:content node having name same as of your template name.

In my case, I don’t define any design page property so I have my design level properties under /etc/design/default/jcr:content node, with the name of my template name (homepage). This node is of type nt:unstructured.
Under this node we have a different node for different parsys, just go to any parsys node in my case it is par as displayed –

Select your par node, here you will see some properties on your right panel of the screen. it looks like –


If you select any of group like General or any other then you will see components property but if you don’t select any of group then this property will not be displayed. If you don’t have this property then Just create this property as a string array and set its value having syntax

Syntax – I
group:<new group name>
in my case it is
group:blog

Syntax – II
Copy and paste the relative path or absolute path of your component. In my case it is /app/blogComponent/components/content/blog

Here no need to define group: prefix.
Save it, go to your web page, clear browser cache, and reload the page now you are able to see you component group in the sidekick. This is the fix only but if you want to remove it from sidekick then it’s not possible to directly uncheck from sidekick as it is not visible in that list, So you have to do it manually.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.