Expand my Community achievements bar.

SOLVED

References showing zero in properties of an asset in aem

Avatar

Level 7

I am encountering a strange issue in AEM. We have multiple projects (representing different domains) on a single instance, each with its own separate codebase.

The problem is that the references for an asset are updated correctly when the page belongs to a particular project (lets say A). However, if I use the same asset on a page from a different project (lets say B), the reference does not get updated, and in the asset properties, it shows 0 references. I am using AEM SP 17.

What I tried:
1. Either I deploy project A or B, the problem remains there. In both scenarios references are updated only if the asset is used in project A.
2. No browser console errors are there when I open the asset > properties > references after using it on a page in project B.
3. No errors in error.log (on clicking references tab)

I have already gone through these threads:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/asset-properties-reference...
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/reference-pages-showing-em...


If there is any config or workflow responsible for the same, please let me know.

I am using ReferenceSearch of AEM, due to this...it is not working properly and shows 0 references even if the asset is used on a page in project B.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@kapil_rajoria 

 

When you open the properties page, a query would be executed at backend. Execute this query in "Explain Query Tool" https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/query... 

 

Notice the index that it is using. Please verify this index. Does it have specific paths defined for indexing?

 


Aanchal Sikka

View solution in original post

8 Replies

Avatar

Level 5

What do you mean by this - I am using ReferenceSearch of AEM,

Avatar

Level 7

http://experience-aem.blogspot.com/2015/07/aem-61-get-references-of-page-or-asset.html
https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/common...

I believe AEM uses the same in backend to show the references in the properties of an asset.
I was also using referenceSearch.search method in my servlet to get the references, but since in the properties it is 0..it also gives zero. It gives correct result, when references are there.

Avatar

Level 9

Hi @kapil_rajoria 

 

It is realy hard to guess what is happening on your local with the info you provided, but could it be because the ReferenceSearch uses a resource resolver obtained using a system user which does not have the same permissions on the content of project A vs on the content of project B ? 

Avatar

Level 7

Hi @Tethich ReferenceSearch is working completely fine. In the above I mentioned it because it gives the same no. of references that are populated in the properties of the asset. So, if there are 0 references, ReferenceSearch also gives 0 references.

If I fix the issue in AEM, ReferenceSearch will automatically give correct answer.

Avatar

Correct answer by
Community Advisor

@kapil_rajoria 

 

When you open the properties page, a query would be executed at backend. Execute this query in "Explain Query Tool" https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/query... 

 

Notice the index that it is using. Please verify this index. Does it have specific paths defined for indexing?

 


Aanchal Sikka

Avatar

Level 7

Thank you @aanchal-sikka  for your reply. I see the problem was indeed with indexing. Someone had made a copy of lucene and renamed it to added a new property. Due to this, the existing functionality of AEM stopped working.

Avatar

Administrator

@kapil_rajoria Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Level 7

Done and correct solution marked!