Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Unable to resolve tags in AEM 6.3 using Tag Manager

Avatar

Level 2

Hi All,

We are upgrading from AEM 6.2 to AEM 6.3. In one of our jsp we are trying to get tags using Tag Manager but in publish instance tag manger is not able to find tags as etc is hidden for anonymous user.

We are getting Tag Manager by adapting resourceResolver (implicit object).

TagManager tagManager = resourceResolver.adaptTo(TagManager.class); // Geting Tag Manager value

Tag tag = tagManager.resolve("/etc/tags/abc"); // When resolving tag is null

Iterator<Tag> iteratorTag = tag.listChildren(); // null pointer exception

Could you please help in finding solution.

Thanks,

Megha Gowroji

1 Accepted Solution

Avatar

Correct answer by
Level 6

The current use always need at least read access to resolve any path in this case its Tag. There is no other approach to resolve. You need to update your instance permissions.

Ref:

User, Group and Access Rights Administration

View solution in original post

5 Replies

Avatar

Level 10

Does you solution work in Author?

Avatar

Level 6

Can you pls check user permissions for that tag or root tag. other that API looks straight forward.

Avatar

Level 2

Ya it works on author and works on publish if we give etc permissions to anonymous  user.  Is it recommended to do it or any other approach?

Avatar

Level 2

Permissions for root tag are not given for anonymous user. issue is when we are accessing page in publish with active login.

It works if etc/tags permissions are given for anonymous user in publish environment. Is there any other way to do it? 

Avatar

Correct answer by
Level 6

The current use always need at least read access to resolve any path in this case its Tag. There is no other approach to resolve. You need to update your instance permissions.

Ref:

User, Group and Access Rights Administration