Helmut Granda
Helmut Granda

Reputation: 4685

AEM component not displayed on Preview Mode

I have developed a few components for AEM but I just ran into an issue. One of the components I created is not displaying when I append the wcmmode=disabled flag. It works great on edit mode but once I pass the flag the component and contents are gone, this is the first time that this happens.

If it helps the component that I created is an extension of the column control component from AEM and it automatically adds children to it.

URL example in Edit Mode: http://localhost:4502/cf#/content/location/file.html

URL example with WCMMODE flag set to disabled: http://localhost:4502/content/location/url.html?wcmmode=disabled

Upvotes: 0

Views: 3062

Answers (3)

Muthu
Muthu

Reputation: 19

$('#ContentWrapper').resize()  / $(document).resize();

Try this code in your JS file. Once document ready, resize method will get updated component invisible portion.

Upvotes: 1

Satya
Satya

Reputation: 21

I guess it is the CSS issue . Can you inspect element &check .some times "float:left,right" cause this issue .

Upvotes: 0

Helmut Granda
Helmut Granda

Reputation: 4685

I was using Column Control (sightly version) as a guide and figured out that the following code was what was causing the issue:

if (typeof wcmmode != "undefined" && wcmmode.isEdit())

Thank you for helping me debug this issue.

Upvotes: 0

Related Questions