Copied to clipboard

Flag this post as spam?

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


  • Andrei Hurynovich 5 posts 25 karma points
    Jun 23, 2014 @ 17:14
    Andrei Hurynovich
    0

    SEO Checker does not generate an xml site map

    Umbraco version 7.1.4, Seo Checker version 1.5.2
    Situation: setting "Enable XmlSitemap" property in SEO confuguration generates an empty xml. What can be wrong here?

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 24, 2014 @ 07:32
    Richard Soeteman
    0

    Hi,

    Propably the exclude in sitemap option is checked on the root document type node and otherwise check if the httphandler is configured in web.config.

    Hope this helps,

    Richard

  • Andrei Hurynovich 5 posts 25 karma points
    Jun 24, 2014 @ 14:05
    Andrei Hurynovich
    0

    Hi Richard,

    The exclude in sitemap option is clear and http handler is configured. However, at this project we are using custom controller/model implementation ... so we don't create umbraco templates in umbraco admin (Settings->Templates) but rather use document type alias to map to the appropriate template under mvc website. So I made an experiment and defined a template via umbraco admin ... and that content item appeared in the sitemap :) Any ideas how we can make it work for our design?

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 25, 2014 @ 08:46
    Richard Soeteman
    0

    Hi Andrei,

    Hmm Good question. The reason the template check exists is because in other situations that will result in an empty page. But in your situation it needs to look a bit further. This won't be an easy 5 minutes fix but I will look what I can do for a next release to support this scenario. What you can do as a workaround maybe is to create a dummy template for now and assign that to the doctypes you use for route hijacking?

    Best,

    Richard

  • Andrei Hurynovich 5 posts 25 karma points
    Jun 25, 2014 @ 12:56
    Andrei Hurynovich
    0

    Hi Richard,

    No luck ... as soon as I specify a default template explicitly umbraco starts using it paying no attention to our custom model and even if to uncheck this template from "Allowed templates" the template is still used ... clearing cache, temporary internet files, etc. has no effect and if then to try to delete the template the following exception is thrown:

    Failed to delete item 1093
    Error running NonQuery: SQL Statement: delete from cmsTemplate where NodeId =1093 Exception: System.Data.SqlServerCe.SqlCeException (0x80004005): The primary key value cannot be deleted because references to this key still exist. [ Foreign key constraint name = FK_cmsDocument_cmsTemplate_nodeId ]
     at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
     at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
     at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
     at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
     at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: SqlCE4Umbraco.SqlCeProviderException: Error running NonQuery: SQL Statement: delete from cmsTemplate where NodeId =1093 Exception: System.Data.SqlServerCe.SqlCeException (0x80004005): The primary key value cannot be deleted because references to this key still exist. [ Foreign key constraint name = FK_cmsDocument_cmsTemplate_nodeId ]
     at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
     at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
     at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
     at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
     at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)

    Stack Trace:

    at SqlCE4Umbraco.SqlCeApplicationBlock.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlCeParameter[] commandParameters)
       at SqlCE4Umbraco.SqlCEHelper.ExecuteNonQuery(String commandText, SqlCeParameter[] parameters)
       at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters)

     

    Only deleting the document types which the template was assigned helps... well, but this is another bug related to umbraco )). Looks like we will have to implement our own site map generation handler unless the behaviour is fixed in SEO Checker.

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 25, 2014 @ 13:26
    Richard Soeteman
    0

    Hi Andrei,

    Sorry you ran into issues using the template. I've just seen that it is possible to read the route table. I'm curious how that looks on your end. Would it be possible to contact me via [email protected] then we can go back and forth on this one to support Route Hijacking as well.

    Best,

    Richard

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Jun 25, 2014 @ 13:48
    Dave Woestenborghs
    0

    Hi Richard,

    Route hijacking shouldn't be the problem. We have project that uses route hijacking and the site map works just fine.

    Dave

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jun 25, 2014 @ 13:52
    Richard Soeteman
    0

    Hi Dave,

    Did you assign templates there? That is the issue your colleague is having now.

    Best,

    Richard

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Jun 25, 2014 @ 16:04
    Dave Woestenborghs
    0

    Yep... al my doctypes have templates

  • Andrei Hurynovich 5 posts 25 karma points
    Jul 01, 2014 @ 15:23
    Andrei Hurynovich
    0

    Hi Richard!

    I have implemented sitemap generator as a surface controller which accepts a language parameter. For undefined or english language it outputs english nodes, for other language - only those belonging to that very language. In SEO Checker -> settings -> domain settings I have 2 nodes: these are home pages for different locales (english and dutch), see mapping below:

    For each domain robots.txt file I specified the Sitemap path:

    • for default (en) locale: http://{HTTP_HOST}/umbraco/surface/sitemapxml/Index/ - outputs all pages for english home page and its descendants
    • for dutch (nl) locale: http://{HTTP_HOST}/umbraco/surface/sitemapxml/Index?language=nl - outputs all pages for dutch home page and its descendants
    My questions are:
    1. Is the way of generating site map for different locales OK with perspective to SEO Checker?
    2. How can I make sure that Robots.txt file is unique for each site (I cant't see it physically...)?
  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jul 01, 2014 @ 15:38
    Richard Soeteman
    0

    Hi,

    Yes you can do both. The xml sitemap should be rendered based on rootnode out of the box, but since you are using your own controller you can modify the robots.txt settings. Right click on the rootnode and then select edit robots.txt file should help you.

    Hope this helps,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft