Im having troubles getting my route to get picked up. It always returns "/Recycle-Bin/filename" as the resolved url.
I have the following routes enabled.
RouteTable.Routes.MapContentRoute(
name: "MyMedia",
url: "mymedia/{node}/{partial}/{action}",
defaults: new { action = "index" },
contentRootResolver: (s) => root.ContentLink);
// EPiServer UI needs the language segment
RouteTable.Routes.MapContentRoute(
name: "MyMediaEdit",
url: CmsHomePath + "mymedia/{language}/{medianodeedit}/{partial}/{action}",
defaults: new { action = "index" },
contentRootResolver: (s) => root.ContentLink);
What i don't understand is i specified the root content link but always get /recycle-bin/xxxx.jpg. Any ideas.
I have specifed the following versionable items in my createcontentwithidientiy method as well
if (content is IVersionable versionable)
{
versionable.IsPendingPublish = false;
versionable.Status = VersionStatus.Published;
versionable.StartPublish = DateTime.MinValue;
}
var securable = content as IContentSecurable;
securable.GetContentSecurityDescriptor().AddEntry(new AccessControlEntry(EveryoneRole.RoleName, AccessLevel.Read));