while I'm hitting experience fragments on browser "undefined" 404 coming | Community
Skip to main content
keshava219
Level 3
June 1, 2022
Solved

while I'm hitting experience fragments on browser "undefined" 404 coming

  • June 1, 2022
  • 3 replies
  • 867 views

while I'm hitting experience fragments on browser "undefined" 404 coming in network tab

 

this request coming from all experience fragments::

 

https://google.com/content/experience-fragments/xyz/ab/pl/hts/asing/advertising/cstem/undefined?id=undefined

please let me know, how will solve this issue 

 

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 Fanindra_Surat

Hi @keshava219 - Your URL seems to be incorrect with /undefined in the path. How are you grabbing this URL of Experience fragment? Ideally the last element in your XF url should be the variation you are trying to access, and for all XF's a default variation of master exists. So, try accessing your XF with replacing undefined as master.
If still doesn't work, the XF might not be published and so re-publish.

3 replies

Fanindra_Surat
Community Advisor
Fanindra_SuratCommunity AdvisorAccepted solution
Community Advisor
June 1, 2022

Hi @keshava219 - Your URL seems to be incorrect with /undefined in the path. How are you grabbing this URL of Experience fragment? Ideally the last element in your XF url should be the variation you are trying to access, and for all XF's a default variation of master exists. So, try accessing your XF with replacing undefined as master.
If still doesn't work, the XF might not be published and so re-publish.

SantoshSai
Community Advisor
Community Advisor
June 1, 2022

Hi @keshava219 

Seems something wrong in constructing URL for accessing Experience Fragment in your custom implementation- Identify what is undefined? It should be Master and/or Variant uses. The plain HTML rendition adds the protocol, host and context path.
eg. 

 

"/content/experience-fragment/master"

 


Reference: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/configuring-and-extending/experience-fragments.html?lang=en

Hope that helps!

Regards,
Santosh

Santosh Sai
Ravi_Pampana
Community Advisor
Community Advisor
June 1, 2022

Is this issue happening on author also? Is your url is getting redirected and appending undefined at the end ? Check if there is any custom code which updates the url to select the variant which might be not working properly.