Copied to clipboard

Flag this post as spam?

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


  • Luke Alderton 192 posts 509 karma points
    Jun 19, 2012 @ 18:26
    Luke Alderton
    0

    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

  • Rune Grønkjær 1372 posts 3103 karma points
    Jun 20, 2012 @ 08:15
    Rune Grønkjær
    0

    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

  • Luke Alderton 192 posts 509 karma points
    Jun 20, 2012 @ 10:20
    Luke Alderton
    0

    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 

  • Rune Grønkjær 1372 posts 3103 karma points
    Jun 20, 2012 @ 10:26
    Rune Grønkjær
    0

    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.

    /Rune

  • Luke Alderton 192 posts 509 karma points
    Jun 20, 2012 @ 10:46
    Luke Alderton
    0

    Okay, thank you, turns out it was a hidden folder created by visual web developer!

    Thanks again,
    Luke

  • Rune Grønkjær 1372 posts 3103 karma points
    Jun 20, 2012 @ 10:56
    Rune Grønkjær
    0

    Great. Thankyou for nothing Visual Web Developer :)

    Please mark the correct answer for other Umbracians to see.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft