6.1.2 - XSLT Includes, File not found. (Sub Folders)
Just run into this issue with Umbraco 6.1.2 where it returns a 'System.IO.DirectoryNotFoundException: Could not find a part of the path' error. When referencing a file relative to a file in the same sub directory.
In 4.x.x, you could reference an include using the following syntax:
<xsl:include href="../templates/_Article.xslt" /> Which would translate to: [xslt]/templates/Article.xslt (e.g. get me something in the XSLT folder)
In 6.1.2, the error says C:\LocalDev\vdb.1020.beth\VS.NET\beth.portfolio.Web\templates\_Gallery.xslt
Noticed the XSLT folder has been dropped.
To work now includes need to be written as:
<xsl:includehref="../xslt/templates/_Article.xslt"/> or <xsl:includehref="templates/_Article.xslt"/> <xsl:includehref="helpers/_MultiPicker.xslt"/>
-
So it looks like when the XSLT processor handles an include, it treats all files as if they are inside "/XSLT", and not a sub folder? Essentially flattening out the file system.
-
Is that the desired behavior or is that a bug? It seems a bit explict to me?
6.1.2 - XSLT Includes, File not found. (Sub Folders)
Just run into this issue with Umbraco 6.1.2 where it returns a 'System.IO.DirectoryNotFoundException: Could not find a part of the path' error. When referencing a file relative to a file in the same sub directory.
In 4.x.x, you could reference an include using the following syntax:
<xsl:include href="../templates/_Article.xslt" />
Which would translate to: [xslt]/templates/Article.xslt (e.g. get me something in the XSLT folder)
In 6.1.2, the error says C:\LocalDev\vdb.1020.beth\VS.NET\beth.portfolio.Web\templates\_Gallery.xslt
Noticed the XSLT folder has been dropped.
To work now includes need to be written as:
<xsl:include href="../xslt/templates/_Article.xslt"/>
or
<xsl:include href="templates/_Article.xslt"/>
<xsl:include href="helpers/_MultiPicker.xslt"/>
-
So it looks like when the XSLT processor handles an include, it treats all files as if they are inside "/XSLT", and not a sub folder? Essentially flattening out the file system.
-
Is that the desired behavior or is that a bug? It seems a bit explict to me?
Laurence
Scrub that, it works as it did before...
It's just the way the errors get reports in the Visulizer which is a bit odd! Ignore the paths in the Visulizer, it's wrong!
the old ../ way works :) Problem solved. Laux
is working on a reply...