Copied to clipboard

Flag this post as spam?

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


  • Gísli Freyr Svavarsson 43 posts 126 karma points
    Oct 25, 2013 @ 12:01
    GĂ­sli Freyr Svavarsson
    0

    Document is empty

    Hi there, I just installed the package on 4.11.3, but I get the following error. 

    This page contains the following errors:
    error on line 1 at column 1: Document is empty
    Below is a rendering of the page up to the first error.

    here's the link: http://rentinreykjavik.com/googleSiteTree.aspx

    Does anybody know what I'm doing wrong? I tried Adam's solution at http://our.umbraco.org/projects/website-utilities/google-sitemap-for-umbraco-4-(jespercom)/google-sitetree-support/40781-Needs-a-document-type-in-4118,-at-least but I still get the same error. 

  • Fiontan 1 post 22 karma points
    Jan 24, 2014 @ 00:46
    Fiontan
    0

    I installed in on Version 7.0.2. The package seems to install fine- no reported errors and all thej files seem to be in place and I can add the macro to a RTE. Whern I browse the page as suggested in teh documentation I get the same error:

     

    This page contains the following errors:

    error on line 2 at column 1: Document is empty

    Below is a rendering of the page up to the first error.

  • Sheppe Pharis 43 posts 139 karma points
    Oct 19, 2014 @ 16:09
    Sheppe Pharis
    0

    I know this is an old thread, but I'll post this here in case anyone encounters this error in the future. I just had this issue, and discovered that the XSLT file in the most recent version throws an error when trying to save it. Presumably that is why it's not outputting anything. Once I replaced the XSLT with the below, it started working:

    <?xml version="1.0" encoding="UTF-8"?>
    <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="html"/>
    <xsl:param name="currentPage"/>
    <xsl:variable name="maxLevelForSitemap" select="6"/>
    <xsl:variable name="url" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))" />
    <xsl:template match="/">
    <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>
    
    <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
    
    <url>  
    <loc>
    <xsl:value-of select="$url"/>
    </loc>
    <lastmod>
    <xsl:value-of select="$currentPage/ancestor-or-self::* [@isDoc][@level=1]/@updateDate" />+00:00
    </lastmod>
    
    <changefreq>
    daily
    </changefreq>
    
    <priority>
    0.8
    </priority>
    
    </url>
    
    <xsl:call-template name="drawNodes"> 
    <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@isDoc][@level=1]"/>
    </xsl:call-template>
    </urlset>
    </xsl:template>
    
    
    <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/* [@isDoc][string(./umbracoNaviHide) != '1' and 
    @level &lt;= $maxLevelForSitemap]">
    <url xmlns="http://www.google.com/schemas/sitemap/0.84">  
    <loc>
    <xsl:value-of select="umbraco.library:NiceUrl(@id)"/>
    </loc>
    <lastmod>
    <xsl:value-of select="@updateDate" />+00:00
    </lastmod>
    
      <!-- optional: changefreq | values: always, hourly, daily, weekly, monthly, yearly, never -->
            <changefreq>
              daily
            </changefreq>
    
            <priority>
    
              0.5
            </priority>
          </url>
    
    
      <xsl:if test="count(./* [@isDoc][string(./umbracoNaviHide) != '1' and
    @level &lt;= $maxLevelForSitemap]) &gt; 0">   
    <xsl:call-template name="drawNodes">
    <xsl:with-param name="parent" select="."/>
    </xsl:call-template>
    </xsl:if>
    </xsl:for-each>
    </xsl:if>
    
    </xsl:template>
    
    </xsl:stylesheet>
  • ProducerTina 4 posts 24 karma points
    Apr 20, 2015 @ 21:12
    ProducerTina
    0

    Hmmm... That still produces errors for me... running Umbraco 4.8.11

    Error occured

    System.NullReferenceException: Object reference not set to an instance of an object. 
    at umbraco.macro.GetXsltExtensionsImpl() 
    at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) 
    at umbraco.macro.GetXsltExtensions() 
    at umbraco.macro.AddMacroXsltExtensions() 
    at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

    I'm a complete newb to Umbraco's deep back end. I can do content / CSS / template updates, but this backend stuff is beyond me. Anyone have any ideas why this is happening?

    The front-end result is:

    Error parsing XSLT file: \xslt\GoogleSiteTree.xslt

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Apr 20, 2015 @ 22:41
    Dennis Aaen
    0

    Hi ProducerTina,

    I have just tried setup a Umbraco version 4.11.8, and uses the code from the post above, and it works fine for me. The steps I follow, is this.

    First create an XSLT file, and name it GoogleSiteTree, after this go to the settings section, into the template folder. create a new template name it e.g sitemap, in this template add the following line.

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
        <umbraco:Macro Alias="GoogleSiteTree" runat="server" />
    </asp:Content>

    After this, click save, then you can vistit the sitemap on the following url http.//www.yourdomain.com/sitemap

    Alternatively if you can't get the XSLT to work, then you could try use the Cultiv Search Engine Sitemap, there is a XSLT version https://our.umbraco.org/projects/website-utilities/cultiv-search-engine-sitemap, and the DynmicNode Razor.

    Or if you set the debug mode to true in the web.config.

    <add key="umbracoDebugMode" value="true" />

    Then you can get the stacktrace by adding  ?umbDebugShowTrace=true to the URL. You can read more about it here https://our.umbraco.org/wiki/how-tos

    Hope this helps,

    /Dennis

     

Please Sign in or register to post replies

Write your reply to:

Draft