Expand my Community achievements bar.

SOLVED

Missing the wrapper element that contains the "section" class

Avatar

Level 3

We have been using AEM since CQ 5.4 when a component gets rendered it gets a generated div that wraps the component and in that div it gets some classes like "section". Usually people post to the community asking how to get rid of these. We have the opposite problem, we're trying to figure how to get them back.

We're in the process of upgrading from 6.1 to 6.3. When we upgrade our publish instance it no longer renders the wrapping DIVs and completely messes with the designs that are in place.

Any ideas would be appreciated

1 Accepted Solution

Avatar

Correct answer by
Level 3

Adding a cq:htmlTag didn't work.

One of my coworkers was tracing code and he he finally nailed the issue. During the upgrade process an ACL node was created under /apps with a "deny everyone read" setting which was done by the upgrade process and not removed.

When the session attempted to read data under the /apps structure it was denied and that resulted in the no wrapper being put on the components.

View solution in original post

8 Replies

Avatar

Level 10

If you look at the components in We.Retail - are you seeing these DIVS?

Avatar

Community Advisor

What is the exact requirement of having this classes ?

Avatar

Level 3

I'm not sure what you mean by we.retail is that a new demo site in 6.3?

Avatar

Level 3

Veena - We have 70+ sites representing over 500k pages that each one is now structurally different. The requirement for having these is so that existing styles, that are managed by a different team, are not screwed up. Now conceivably it may be better at some point to get rid of this wrapping div but we would want to do so in a controlled manner. If I'm unable to determine why they disappeared in the first place I have no level of confidence that they won't re-appear at some point.

Avatar

Community Advisor

I am checking the we.retail demo site (shipped as a sample site , as geometrixx used to be) now. Meanwhile can you send me a mock up of your components HTML as of now. I will let you know what we can do to achieve that

Avatar

Community Advisor

Good News for you and thanks for bringing up this .. I also got to learn a new thing.

So what you have to do is add a cq:htmlTag under your cq:component node like below

1368933_pastedImage_1.png

1368934_pastedImage_2.png

Reference which helped me

Custom Node Types - Check cq:component section in this

Does anyone have official documentation of cq:htmlTag?

Remove component wrapper divs in CQ/AEM - CoderMagnet - JAVA JCR AEM Sightly Resource

Happy coding

Avatar

Correct answer by
Level 3

Adding a cq:htmlTag didn't work.

One of my coworkers was tracing code and he he finally nailed the issue. During the upgrade process an ACL node was created under /apps with a "deny everyone read" setting which was done by the upgrade process and not removed.

When the session attempted to read data under the /apps structure it was denied and that resulted in the no wrapper being put on the components.

Avatar

Community Advisor

Good to hear you got that working and cq:htmlTag was not the issue. May be i understood your question wrong . Anyway it was a good learning for me . Tried something which I neva took the pain to try