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.
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.
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.
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.
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
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.
is working on a reply...