sys.pub_path returns unknownpath in DB publishing

We are using DB publishing to publish a listing of content IDs and paths to a DB for a dynamic application. The problem we have is that the variable $sys.pub_path returns the value “unknownpath” for two of the locales (ja-jp and zh-cn)

We have three content types for which I am publishing content items. We have three translation locales (en-us, ja-jp, zh-cn) for which we normally publish HTML. All three of these locales are published to the same DB Site. The context for the DB publish is 303 and each of the content types has a location scheme that matches the template used in the $rx.location.generate().

The binding in the DB publishing template looks like this:

sitebase = $sys.variables.rxs_urlroot;  
result = "";  

if ($sys.item.getProperty("rx:sys_lang").String == "ja-jp")  
{
	sitebase = $sys.variables.rxs_urlroot.replaceAll("www","japan");   

}  
else if  ($sys.item.getProperty("rx:sys_lang").String == "zh-cn")  
{     
	sitebase = $sys.variables.rxs_urlroot.replaceAll("www","china");   

}  
 
if($sys.item.getDefinition().getInternalName() == "xilCtDocFiles" || $sys.item.getDefinition().getInternalName() == "rffFile")  
{    
	result = sitebase + $rx.location.generate($sys.assemblyItem,"rffBnBinary");
} else if ($sys.item.getDefinition().getInternalName() == "xilCtAnswers")  
{      
	result = sitebase + $rx.location.generate($sys.assemblyItem,"xilTpPgAnswers"); 
}  else {   
	"";  
}  
result;

The location scheme for the xilCtDocFiles content type:

$sys.pub_path.replaceAll("/files","").replaceAll("\[ja-jp\] ", "").replaceAll("\[zh-cn\] ", "") + $sys.item.getProperty('rx:item_file_attachment_filename').String;

The location scheme for the rffFile content type:

$sys.pub_path.replaceAll("/files","").replaceAll("\[ja-jp\] ", "").replaceAll("\[zh-cn\] ", "") + $sys.item.getProperty('rx:item_file_attachment_filename').String;

The location scheme for the xilCtAnswers content type does not use pub_path (and, of course, works):

'/support/answers/' + $sys.item.getProperty("sys_title").String.replaceAll("\[ja-jp\] ", "").replaceAll("\[zh-cn\] ", "") + '.htm'   

The content in the CX is in three different SiteFolders
//Sites/XilinxEnglish/*
//Sites/XilinxJapanese/*
//Sites/XilinxChinese/*

The communities for each of the different content items is visible to the DB Site and publishes content to the site properly except for the bad path.

The exact value returned from the above binding (for a xilCtDocFiles content item for the Japan locale) would be something like:

http://japan.xilinx.com/unknownpath/j_ds202.pdf

The China locale has the same result as the JP.

For the matching EN item the URL is correct:

http://www.xilinx.com/support/documentation/data_sheets/ds202.pdf

I saw a post on this forum about items in a slot returning “unknownpath” when the folder_id and site_id were both populated. These items do not have any values in the psx_objectrelationship table where either of those two fields are populated. The items do have relationships (1 each) where config_id=3 (folder relationship) these do correspond to their respective parent folder.

I have run out of troubleshooting ideas. Any pointers or help would be appreciated.

Thanks.

John Blakie

Problem Solved.

The problem was that the Site for the DB publish had a more restrictive value for “Site Folder Root” than necessary. The Site Folder Root was set to “//Sites/XilinxEnglish” which prevented the system from finding the path to the JP and CN content items. I changed the Site Folder Root value to “//Sites” and bingo the paths to items were instantly all correct.

John