Component not working properly on pages under "/etc/..." | Community
Skip to main content
harmanp44178922
Level 2
September 26, 2018
Solved

Component not working properly on pages under "/etc/..."

  • September 26, 2018
  • 4 replies
  • 1696 views

Hi,

I have created a hotspot component using html5smartimage. This component is working fine on pages under "/content" but it is not working properly for pages under "/etc".

Also I am using imageMap here.

my code is below:

            Image img = new Image(res);

            img.setItemName(Image.PN_REFERENCE, "fileReference");

            img.setSelector("img");

            String mapDefinition = properties.get(Image.PN_IMAGE_MAP, ""); out.println(mapDefinition);

            ImageMap imageMap = ImageMap.fromString(mapDefinition);

            String map = imageMap.draw("someid");

            String src = img.getSrc();

The catch here is that "map" is not getting populated for pages under "/etc" .
Please give your suggestions.

AEM Version: 6.0

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

Hi,

Is there a reason for creating a page under /etc ? Ideally all the content (pages, images, products etc) should be under /content.

also, is this issue is any instance specific ? Just to understand if there is any access issue.

any more details on that component design would be helpful

4 replies

smacdonald2008
Level 10
September 26, 2018

Are you getting an error in the logs - if so - can you post to give the community more details. A component should be working regardless of where its used. Checking on this issue.

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
September 26, 2018

Hi,

Is there a reason for creating a page under /etc ? Ideally all the content (pages, images, products etc) should be under /content.

also, is this issue is any instance specific ? Just to understand if there is any access issue.

any more details on that component design would be helpful

smacdonald2008
Level 10
September 27, 2018

As Lokesh suggests - the best practice using AEM is to create pages following docs:

Creating and Organizing Pages

When you follow the docs - pages are placed under /content. I recommend following best practice as specified in the docs.

Adobe Employee
September 27, 2018

You should not create pages under /etc. All pages should exist only under /content.