I have a pdf content item that was copied and pasted “As Link” from one site (site A) to another (site B). The pdf published properly within both sites. However, in a template on site B, when I use $rx.location.generate to create the URL to the site B pdf, the path is /unknownpath/myfile.pdf.
I’m assuming it’s confused by it being on two different sites…even though the pdf itself published ok(?).
Is there a way to remedy this short of duplicating the pdf and having two separate content items? It doesn’t matter if the link points to the site A pdf or the site B pdf. Anything is better than “unknownpath”.
Are you verifying $rx.location.generate’s value by previewing the template? I am able to generate a similar experience by going to Publishing Design -> Context -> Public then selecting the default context and finally opening the content item in the Test Panel to see the URL generated. If I change the Site parameter to the original Site it does generate an unknownpath URL.
The sys_siteid=350 is correct. When entered into a browser, the pdf files shows perfectly. If I update the sys_context with the correct publish context id, it shows perfectly.
From what I gather, the test panel doesn’t know how to generate a path to a folder outside its Site’s path. Excluding test panel, where else are you seeing an unknownpath so that I can try reproducing the behavior.