i created new CultivSearchEngineSitemap under my homepage (the homepage is the root - all the other content in under it),
but the sitemap that generated, dont include my homepage from some reason.
i looked at the xsl and i guess that one of these lines making the problem:
<xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)"> <xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]"> <!-- If the document does not have a template, nothing is shown in the frontend anyway. So this is not proper content and should not be in the sitemap --> <xsl:if test="@template > 0">
i guess that from some reason my homepage is not fill the condition to enter the loop, but i dont understand why.
Does the homepage have a template? Check the generic properties tab and make sure it is published while a template is selected.
Does the homepage have a property with the alias of "umbracoNaviHide" and is it checked on? You might want to uncheck that checkbox.
I don't suppose the homepage requires you to be logged in, right?
If that doesn't help, try putting the sitemap node on the same level as the homepage, instead of under it (don't think this is going to help, there's no reason that it should really).
Maybe you can post the XML of your homepage, in an XSLT that's in your homepage add this temporarily to get the XML:
<p> .</p> </data><data alias="emailTo">[email protected]</data><data alias="emailBody">Hello a user of your site has filled in your contact form on [Date] @ [Time]
Name: [Name] Subject: [Subject] Email: [Email] Message: [Message]</data><data alias="emailReplyFrom">[email protected]</data><data alias="emailReplySubject">Thank you for your message</data><data alias="emailReplyBody">Hello [Name] Thanks for contacting us, we will reply shortly.
<!-- update this variable on how deep your site map should be --> <xsl:variable name="maxLevelForSitemap" select="6"/> <xsl:variable name="url" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))" />
<xsl:template match="/"> <!-- change the mimetype for the current page to xml --> <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>
<!-- ==================================================== This <URL> node is for the homepage/root page ==================================================== --> <url> <loc> <xsl:value-of select="concat($url,'/')"/> </loc> <lastmod> <xsl:value-of select="concat($currentPage/ancestor-or-self::node [@level=1]/@updateDate,'+00:00')" /> </lastmod> </url>
<xsl:template name="drawNodes"> <xsl:param name="parent"/> <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)"> <xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]">
<!-- If the document does not have a template, nothing is shown in the frontend anyway. So this is not proper content and should not be in the sitemap --> <xsl:if test="@template > 0"> <url> <loc><xsl:value-of select="$urlPrefix" /><xsl:value-of select="umbraco.library:NiceUrl(@id)" /></loc> <lastmod><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'yyyy-MM-ddThh:mm:ss+00:00')" /></lastmod> <xsl:if test="./data [@alias='searchEngineSitemapChangeFreq'] != ''"> <changefreq><xsl:value-of select="./data [@alias='searchEngineSitemapChangeFreq']" /></changefreq> </xsl:if> <xsl:if test="./data [@alias='searchEngineSitemapPriority'] != ''"> <priority><xsl:value-of select="./data [@alias='searchEngineSitemapPriority']" /></priority> </xsl:if> </url> </xsl:if>
Picking up this older thread.I tried the solution of using the modified xslt file but got the following error when I tried to save it:
(I tried ignoring the error but got an invalid file and temporaralily lost my development section!)
Error occured
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 parent)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList,
XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter
writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable
input, XsltArgumentList arguments, XmlWriter results, XmlResolver
documentResolver)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String
fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I get the same "System.OverflowException" error when trying Hundebols code. I also get this error when I leave the original code and only change 1 to 0 in this line: <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::*[@level=1]"/> (as suggested in the "issue with 4.6.1" thread).
I am doing some changes on an Umbraco site where the home page is level 0, and don't have enough Umbraco skills to get it to work. If someone can take a look, I will be super happy! =)
sitemap dont include my homepage
hello,
i installed the nice package.
i created new CultivSearchEngineSitemap under my homepage (the homepage is the root - all the other content in under it),
but the sitemap that generated, dont include my homepage from some reason.
i looked at the xsl and i guess that one of these lines making the problem:
i guess that from some reason my homepage is not fill the condition to enter the loop, but i dont understand why.
(the homepage have template).
Thanks!
Eran.
Maybe you can post the XML of your homepage, in an XSLT that's in your homepage add this temporarily to get the XML:
hello sebastiaan,
is the homepage actually published? - yes.
Does the homepage have a template? yes.
Does the homepage have a property with the alias of "umbracoNaviHide" and is it checked on? checkbox unchecked.
I don't suppose the homepage requires you to be logged in, right? no.
try putting the sitemap node on the same level as the homepage - still not working (actually now nothing is printed on the xml sitemap).
this is my content tree structure:
-- content
-- home
-- about
-- sitemap
this is the xml of the home page: Thanks!
all the bizzar signs are the hebrew that dont displayed correctly at the post..
anyone can help?
Hi Eran!
Try this xslt - paste it in your CultivSearchEngineSitemap.xslt instead of the one you have.
// best regards
hundebol
thanks Hundebol now its works as expected!
You're welcome!
The reason why it did not work before, is because this package traverses the tree from level one, whereas your homepage was at level 0.
I always have my homepage at level 0 (right under "Content") - so i modified the xslt of this great package.
cheers
// hundebol
Hi,
I have just downloaded the package and took the folowing actions:
renamed the template to Template.
Created a page called sitemap based on a Runway TextPage ,using the template and hidden from the navigation.
If I browse to http://www.jrbp1.com/sitemap.aspx I see a file starting:
<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
−
<url>
<loc>http://www.jrbp1.com/about-james.aspx</loc>;
<lastmod>2010-10-03T12:32:31+00:00</lastmod>
</url>
I assume this means that my home page is not included as per the first post in this thread.
My content looks like this:
Content
Runway Homepage
About...
Galleries
Gallery1
Gallery2....
Content
Picking up this older thread.I tried the solution of using the modified xslt file but got the following error when I tried to save it:
(I tried ignoring the error but got an invalid file and temporaralily lost my development section!)
Error occured
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 parent)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Hi!
I get the same "System.OverflowException" error when trying Hundebols code. I also get this error when I leave the original code and only change 1 to 0 in this line: <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::*[@level=1]"/> (as suggested in the "issue with 4.6.1" thread).
I am doing some changes on an Umbraco site where the home page is level 0, and don't have enough Umbraco skills to get it to work. If someone can take a look, I will be super happy! =)
How about if you remove: [@level=1] entirely?
The code posted by Hundebol did not work for me, but I used some of his code to fix mine. This is what I ended up with
Hi,
I know this is a bit old but I'm having the same issues and have replaced the code with both of the items above but still the homepage doesn't show.
tree layout is:
Content - site 1 - page 1 - page 2 - site 2 - page 1 - page 2
etc. I would happily have another page in between Content and site 1 and 2 however I've no idea what would go in that page??
Either way, if I can just get the hompage to show, that would be amazing!
is working on a reply...