I have created multiple products under another product in the starter kit and have started to receive this error:
More than one matching file found. The xslt must have a unique name.
The error shows in the actual website when I choose the product variant from the drop down list, I was wondering what could be causing this and how to fix it, any help would be appretiated.
That's because you have two xslt's of the same name. This will happen if your xslt's are placed in folders, thereby giving you the opportunity to name them the same.
The Tea Commerce invokeXslt method will look in both the xslt folder and all it's subfolders to find the xslt requested. If it finds two it will throw the error above, to let you know. Otherwise it would not be able to choose or may just choose the first one, in which case funny stuff could happen :)
Thanks for the help, but I've checked over the xslt files and can't seem to find any files with duplicate names, is there anything else that could cause this error? I haven't created any extra xslt files in the project, all that exists are the default ones that come with the starter kit.
That explanation is the only one, I'm sorry. Here's the code that generates your error:
string[] files = Directory.GetFiles( GlobalSettings.FullpathToRoot + "xslt", xsltFile, SearchOption.AllDirectories );
if ( files.Length > 1 ) {
return"More than one matching file found. The xslt must have a unique name.";
}
As you can see it's pretty straight forward. More than one file causes the error. Maybe take a look at the server and see if something is hidden. Maybe make a search for the xslt in question.
To see what xslt is called open the firebug console when provoking the error.
The xslt must have a unique name.
Hi,
I have created multiple products under another product in the starter kit and have started to receive this error:
More than one matching file found. The xslt must have a unique name.
The error shows in the actual website when I choose the product variant from the drop down list, I was wondering what could be causing this and how to fix it, any help would be appretiated.
Thanks in advance,
Luke
Hi Luke,
That's because you have two xslt's of the same name. This will happen if your xslt's are placed in folders, thereby giving you the opportunity to name them the same.
The Tea Commerce invokeXslt method will look in both the xslt folder and all it's subfolders to find the xslt requested. If it finds two it will throw the error above, to let you know. Otherwise it would not be able to choose or may just choose the first one, in which case funny stuff could happen :)
/Rune
Hi,
Thanks for the help, but I've checked over the xslt files and can't seem to find any files with duplicate names, is there anything else that could cause this error? I haven't created any extra xslt files in the project, all that exists are the default ones that come with the starter kit.
Thanks,
Luke
That explanation is the only one, I'm sorry. Here's the code that generates your error:
As you can see it's pretty straight forward. More than one file causes the error. Maybe take a look at the server and see if something is hidden. Maybe make a search for the xslt in question.
To see what xslt is called open the firebug console when provoking the error.
/Rune
Okay, thank you, turns out it was a hidden folder created by visual web developer!
Thanks again,
Luke
Great. Thankyou for nothing Visual Web Developer :)
Please mark the correct answer for other Umbracians to see.
/Rune
is working on a reply...