Copied to clipboard

Flag this post as spam?

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


  • julius 107 posts 289 karma points
    Sep 15, 2011 @ 09:54
    julius
    0

    SearchForTemplate not working on our production site

    Hello,

    We have an umbraco website with the following 404handler.config content.

    <?xml version="1.0" encoding="utf-8" ?>
    <NotFoundHandlers>
        <notFound assembly="umbraco" type="SearchForAlias" />
        <notFound assembly="umbraco" type="SearchForTemplate"/>
        <notFound assembly="umbraco" type="SearchForProfile"/>
        <notFound assembly="umbraco" type="handle404"/>
    </NotFoundHandlers>

    Some of the functionality relies on SearchForTemplate. The sites for example fires Ajax calls to /JSON and we have a template called JSON, but no node called JSON. This functionality relies on the automatic lookup of templates by name.

    This functionality works on our local and development server, but not on our acceptance and production server, but we are totally in the dark as to what causes this.

    The 404handlers.config is the same on all environments.

    Your help will be much appreciated.

     

     

  • David Verberckmoes 46 posts 77 karma points
    Sep 16, 2011 @ 11:37
    David Verberckmoes
    0

    Hi Julius,

    do you have extensionless urls configured on your acceptance / production environments? If you don't then IIS won't pass the request to the asp.net handler.

    What are the IIS versions used on dev/prod?

    Rgds,

    David 

  • julius 107 posts 289 karma points
    Sep 20, 2011 @ 01:54
    julius
    0

    We found the issue after some searching. The problem was that the cmsTemplates table contained duplicate templates. I am still not sure how these got in there, but I think it happened because I created a Document Type with a name that was already assigned to a template and it auto-created another template with that name, because the "Create matching template" option was ticked.

    It seems that umbraco can't decide which template to load when there are two or more templates with the same alias. Also, when there are two templates with the same alias, it becomes impossible to delete one of these templates. You have to alter the alias of one of the duplicates in the db, before you can delete.

     

Please Sign in or register to post replies

Write your reply to:

Draft