DNN.Blog icon indicating copy to clipboard operation
DNN.Blog copied to clipboard

The relative virtual path is not allowed here

Open fprati opened this issue 6 years ago • 2 comments

I have the eventlog full of this kind of exceptions:

The relative virtual path is not allowed here.

Message:The relative virtual path 'C:/Inetpub/vhosts/domain.com/httpdocs/Portals/0/Blog/Templates/latestPosts/CommentsTemplate.html' is not allowed here.

StackTrace:

at System.Web.VirtualPath.FailIfRelativePath() at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) at System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath) at System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) at DotNetNuke.Modules.Blog.Templating.Templating.GetTemplateFileCallBack(CacheItemArgs cacheItemArgs) at DotNetNuke.Common.Utilities.DataCache.GetCachedDataFromRuntimeCache(CacheItemArgs cacheItemArgs, CacheItemExpiredCallback cacheItemExpired)

or

Message:The relative virtual path 'C:/Inetpub/vhosts/domain.com/httpdocs/Portals/0/Blog/Templates/categoryList/CommentsTemplate.html' is not allowed here.

or

Message:The relative virtual path 'C:/Inetpub/vhosts/domain.com/httpdocs/Portals/0/Blog/Templates/tagList/CommentsTemplate.html' is not allowed here.

Software Versions

  • DNN: 9.2.0
  • Module: 6.4.1

I am not using comments, in fact they are disabled. It happens on 2 websites (separate DNN instances). It does not matter whether I use the provided [system] templates or my own [local].

Best regards

Franco

fprati avatar Aug 10 '18 14:08 fprati

latestPosts/CommentsTemplate.html, categoryList/CommentsTemplate.html and tagList/CommentsTemplate.html are not part of the default templates, my guess is that the template you are using is looking for a CommentsTemplate.html file that is not there in the first place, can you zip and upload your template to this issue @fprati

valadas avatar Oct 31 '18 07:10 valadas

Update: I seem to not see the error anymore. I think I obtained it by simply unticking the 'Allow comments' on modules such as calendar and latestposts, and keeping it ticked on the main module. If that's the case, as the tick is on by default, many other users should see this kind of exception and not just me...

fprati avatar Oct 31 '18 09:10 fprati