Hi,
We have a standard LinkBuilder DPM code which builds link for a content item of a specific site which is configured in canonical URL format. Here the problem is the code is generating canonical URL's in preview and generating URL's of format /sites/v/index.jsp?vgnextoid=XXXX in live. When we click those URL's in live it is going to 404, where as the canonical URL's in preview are working fine...
Preview URL generated: https://mypreviewstg.okla.seagate.com/sites/NewsPortal/default/Top-Stories/Springtown-Employees-Pitch-in-at-Womens-Shelter
Live URL generated: http://myseagatestg.okla.seagate.com/sites/v/index.jsp?vgnextoid=505344365595c410VgnVCM1000007449090aRCRD&vgnextfmt=default
The below is the code snippet that generates the URL ... Any help would be highly appreciated.
String str1 = localContentInstance.getContentManagementId().getId();
String str2 = localContentInstance.getAttributeValue("NA-ARTICLE-TEASER-HEADLINE") != null ? (String)localContentInstance.getAttributeValue("NA-ARTICLE-TEASER-HEADLINE") : localContentInstance.getName();
LinkSpec localLinkSpec = new LinkSpec();
localLinkSpec.setOid(str1);
localLinkSpec.setSiteName("NewsPortal");
String str3 = localContentInstance.getAttributeValue("NA-ARTICLE-ARTICLE-URL") == null ? "" : (String)localContentInstance.getAttributeValue("NA-ARTICLE-ARTICLE-URL");
boolean bool = true;
if (str3.isEmpty())
{
str3 = LinkBuilder.buildLink(localLinkSpec, paramRequestContext, true, true);
bool = false;
}
Thanks and Regards,
T.R.Venkatraman