An Asset with multiple Vanity URL Set As Default is not working because method includeLinks(true) in AssetReader API does not return default URL

(Doc ID 2308535.1)

Last updated on SEPTEMBER 20, 2017

Applies to:

Oracle WebCenter Sites - Version 12.2.1.2.0 and later
Information in this document applies to any platform.

Symptoms

There are three different vanity URLs (one is autogenerated), and set one of them to be the default one. The issue is that no matter which URL is set as the default one, the following controller code always returns the same URL, which is not the one we have set.

Map assetMap = newAssetReader()
.forAsset(getAssetId())
.select("name,subtype,id")
.forLocale("el_GR")
.immediateOnlyAttributes(false)
.includeLinks(true)
.read();

models.put("canonicalurl",assetMap._link_);

In other words, the method includeLinks(true) in AssetReader API does not return default URL

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms