DefaultEmailNotification and Formatter

Vote:
 

CMS version 10.5

Im implementing Content Approval and the default notification email has some default formatting with a link "To object" but only links to href="/EPiServer/CMS/#context=epi.cms.contentdata:///2060_2106" without domain name.

Is that a config thing or a bug? 

I could implement my own formatter, but i don't really get how (yet)

#176819
Mar 28, 2017 13:11
Vote:
 

Sure looks like a bug. The Model.Approval.CallToActionUrl uses:

 public virtual Url GetEditViewUrl(ContentReference contentLink, EditUrlArguments editUrlArguments)
    {
      if (ContentReference.IsNullOrEmpty(contentLink))
        throw new ArgumentNullException("contentLink");
      if (editUrlArguments == null)
        throw new ArgumentNullException("editUrlArguments");
      return this.ResolveUrl((SiteDefinition) null, contentLink, editUrlArguments);
    }

SiteDefinition is null, it will never return the absolute url... 

#176820
Mar 28, 2017 13:36
Vote:
 

The (SiteDefinition) null shouldn't be a problem becauce it should be handled later in DefaultEditUrlResolver... BUT

Because i do have approvals sequence on block/asset folder on globalassets, the DefaultEditUrlResolver GetSite(ContentReference) is looking for Ancestors and then finds the RootFolder for assets which is not part of an SiteDefinitionen.

Therefore it is always important to have WildCardHost under websites in Admin. I didn't have that.

In an multisite scenario it would preferably be to have site specific assets, so the url would point o the right host.

#176928
Mar 30, 2017 9:19
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.