DNNCommunity / DNN.Blog

The official blog module for the DNN Platform
Other
38 stars 41 forks source link

The relative virtual path is not allowed here #137

Open fprati opened 5 years ago

fprati commented 5 years ago

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

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

valadas commented 5 years ago

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

fprati commented 5 years ago

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...