Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kelsee Ishmael 71 posts 158 karma points
    Oct 08, 2010 @ 01:32
    Kelsee Ishmael
    0

    Having a problem with umbraco.library.RenderTemplate

    I'm trying to use the "RenderTemplate" function in a macro. I am using the following code.

    Important Notes:
     - I am using v 4.5 w/ <UseLegacyXmlSchema>true</UseLegacyXmlSchema> in umbracoSettings.config
     - This installation of umbraco is on a subdirectory
     - 1078 is a page node and 1080 is a template node.
     - This code worked for me previously. So, it should either be a problem with the 4.5 upgrade or the fact that this is on a subdirectory.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library"
      exclude-result-prefixes="msxml umbraco.library">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">
    <xsl:value-of select="umbraco.library:RenderTemplate(1078, 1080)"/>
    </xsl:template>
    </xsl:stylesheet>

     

    When i place this macro on a template, I get this error where the macro should be.

     

    System.Web.HttpException (0x80004005): The file '/default.aspx' does not
     exist.
       at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
       at 
    System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
     virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean 
    allowBuildInPrecompile, Boolean throwIfNotFound, Boolean 
    ensureIsUpToDate)
       at 
    System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
     context, VirtualPath virtualPath, Boolean noBuild, Boolean 
    allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, 
    Boolean ensureIsUpToDate)
       at 
    System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
     virtualPath, HttpContext context, Boolean allowCrossApp, Boolean 
    throwIfNotFound)
       at 
    System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath
     virtualPath, Type requiredBaseType, HttpContext context, Boolean 
    allowCrossApp)
       at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext 
    context, String requestType, VirtualPath virtualPath, String 
    physicalPath)
       at 
    System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext
     context, String requestType, VirtualPath virtualPath, String 
    physicalPath)
       at System.Web.HttpApplication.MapHttpHandler(HttpContext context, 
    String requestType, VirtualPath path, String pathTranslated, Boolean 
    useAppConfig)
       at System.Web.HttpServerUtility.Execute(String path, TextWriter 
    writer, Boolean preserveForm)
       at System.Web.HttpServerUtility.Execute(String path, TextWriter 
    writer, Boolean preserveForm)
       at System.Web.HttpServerUtility.Execute(String path, TextWriter 
    writer)
       at umbraco.library.RenderTemplate(Int32 PageId, Int32 TemplateId)' 
    -->
    

     

    Does anybody know why this is happening?

    Thank you so much!

     

  • Kelsee Ishmael 71 posts 158 karma points
    Oct 08, 2010 @ 01:57
    Kelsee Ishmael
    0

    I've come to the conclusion, that I'm pretty sure the issue is related to Umbraco being hosted inside of a sub-directory. It is trying to find default.aspx in the root of the site instead of in umbraco's directory root.

    Does anybody know where to change the path to this default.aspx?

Please Sign in or register to post replies

Write your reply to:

Draft