Skip to main content
kapil_rajoria
Community Advisor
Community Advisor
janv. 24, 2025 7:31 PM UTC
Répondu

References showing zero in properties of an asset in aem

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-references-is-empty-in-aem-6-5-20/m-p/688081
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/reference-pages-showing-empty-from-aem-assets-while-selecting/m-p/634249


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.

Ce sujet a été fermé aux réponses.
aanchal-sikka
Community Advisor
janv. 25, 2025 6:21 AM UTC

@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-and-indexing-best-practices#explain-query 

 

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

 

Aanchal Sikka

8 commentaires

SreenivasBr
Level 4
janv. 24, 2025 7:54 PM UTC

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

Traduire
kapil_rajoria
Community Advisor
Community Advisor
janv. 24, 2025 8:06 PM UTC

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/commons/ReferenceSearch.html

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.

Traduire
Tethich
Community Advisor
Community Advisor
janv. 25, 2025 3:18 AM UTC

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 ? 

Traduire
kapil_rajoria
Community Advisor
Community Advisor
janv. 26, 2025 9:07 AM UTC

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.

Traduire
aanchal-sikka
Community Advisor
Community Advisor
janv. 25, 2025 6:21 AM UTC

@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-and-indexing-best-practices#explain-query 

 

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

 

Traduire
Aanchal Sikka
kapil_rajoria
Community Advisor
Community Advisor
janv. 28, 2025 8:21 AM UTC

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.

Traduire
kautuk_sahni
Level 9
janv. 27, 2025 1:07 PM UTC

@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!

Traduire
Kautuk Sahni
kapil_rajoria
Community Advisor
Community Advisor
janv. 28, 2025 8:22 AM UTC

Done and correct solution marked!

Traduire