Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Jan 24, 2014 @ 12:36
    Craig O'Mahony
    0

    Error reading XSLT file: \xslt\XSLTsearch.xslt

    Hi,

    I'm trying to configure the XSLT Search onto a new 6.1.5 Umbraco (which I've never used before) and I'm getting the following error (with debugging turned on) when I hit the search page (from an input field).

    Error loading XSLT XSLTsearch.xslt
    XSLT compile error.
      at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
      at System.Xml.Xsl.Xslt.XsltLoader.Load(XmlReader reader)
      at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver)
      at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
      at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
      at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode)
      at umbraco.macro.<>c__DisplayClass12.<getXslt>b__11()
      at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem[TT](String cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, Nullable`1 timeout, Func`1 getCacheItem, Object syncLock)
      at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem[TT](String cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, Nullable`1 timeout, Func`1 getCacheItem)
      at Umbraco.Core.CacheHelper.GetCacheItem[TT](String cacheKey, CacheItemPriority priority, CacheDependency cacheDependency, Func`1 getCacheItem)
      at umbraco.macro.getXslt(String XsltFile)
      at umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError)

    Is the XLST Search compatible with this version or is there something else amiss? Hopefully the error might mean something to someone!

    Thanks in advance.

    Craig

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 24, 2014 @ 12:59
    Douglas Robar
    1

    Hi, Craig,

    Yes, XSLTsearch is compatible with Umbraco 6.1.5. Can I ask if you have the following files in your website after installing XSLTsearch?

    /xslt/xsltsearch.xslt
    /app_code/xsltsearch.cs
    

    If you do (and you should), the error speaks a lot about the client dependency cache, which might be over-caching things. Please set the debug= flag to TRUE in the site's web.config file. The line should look something like:

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">
    

    That will disable the client dependency cache and restart the application pool and should clear things up or at least give a better error message if there is still an underlying issue.

    cheers,
    doug.

  • Craig O'Mahony 364 posts 918 karma points
    Jan 24, 2014 @ 13:20
    Craig O'Mahony
    0

    Urm no I haven;t got either of those files!!!

    WHAT!?!?! 

    Could it be that my hosting wouldn't allow the package to create them?

    Cheers Doug

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 24, 2014 @ 14:36
    Douglas Robar
    100

    I suppose it's possible your host is being a bother. You can install the files manually if you want... you'd unzip the xsltsearch package zip file and copy the two files to their locations. You'd also need to create a Macro in the umbraco backoffice (in the Developer section) if it isn't already there. It should use the xsltsearch.xslt file and will need a fair few parameters (on the parameters tab). Hopefully that at least got created for you when you first installed the xsltsearch package.

    Or, you could uninstall xsltsearch and try re-installing it through the package repository, looking for any errors during the package installation.

    Another option... if you are using MVC mode with Umbraco 6.1.5 you will probably prefer ezSearch rather than XSLTsearch. They do the same thing but ezSearch is Razor-based.

    cheers,
    doug.

  • Craig O'Mahony 364 posts 918 karma points
    Jan 24, 2014 @ 15:04
    Craig O'Mahony
    0

    Thanks Doug,

    What I've done is install the XLST search in a local application and then copied the two files in question into the required location.

    The search is firing now but it's not finding any matches (i'm using the standard bodyText). Could there be something else missing you think?

    I'm not in MVC mode, indeed MVC as a concept confuses the daylights out of me which is another issue completely!

    Thanks again,

    Craig

  • Craig O'Mahony 364 posts 918 karma points
    Jan 24, 2014 @ 15:13
    Craig O'Mahony
    0

    Turns out the actual search page was on the wrong level in the content, moving it to under the Home node solved the issue. :)

    Happy days!

    Thanks again Doug you are a star.

    Craig

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 24, 2014 @ 16:37
    Douglas Robar
    0

    Way to go, Craig!

    cheers,
    doug.

  • Craig O'Mahony 364 posts 918 karma points
    Jan 28, 2014 @ 15:09
    Craig O'Mahony
    0

    Hi Doug,

    Sorry I know that I marked this one as closed but......

    I'm getting an error of 

    An item with the same key has already been added.

    [ArgumentException: An item with the same key has already been added.]
       System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52
       System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +10695474
       System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +10
       umbraco.controls.ContentControl.AddControlNew(Property p, TabPage tp, String cap) +224
       umbraco.controls.ContentControl.LoadPropertyTypes(IContentTypeComposition contentType, TabPage tabPage, Hashtable inTab, Int32 tabId, String tabCaption) +252
       umbraco.controls.ContentControl.CreateChildControls() +486
       System.Web.UI.Control.EnsureChildControls() +83
       umbraco.controls.ContentControl.OnInit(EventArgs e) +38
       System.Web.UI.Control.InitRecursive(Control namingContainer) +134
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +191
       System.Web.UI.ControlCollection.Add(Control child) +86
       umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1190
       System.Web.UI.Control.InitRecursive(Control namingContainer) +134
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489


    Whenever I view a page in the content tree that has a macro inserted into it. From reading some other posts on here it seem that the XSLTsearch.cs is causing the issue and should be removed from the app_code folder. If I remove the cs file then the content is displayed as expected but the search no longer works!!!

    Any ideas my good friend?

    Craig

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 28, 2014 @ 15:21
    Douglas Robar
    0

    Hi, Craig,

    Gonna need more info on this one. For instance, are you running your site by compiling it under Visual Studio? Also, what have you got in your /umbraco/xsltextensions.config file?

    [Nevermind... when the forum refreshed I saw the full output... thank you!] Can you set umbracoDebugMode="true" in the site's web.config file and then, add the querystring ?umbDebugShowTrace=true to the url of whatever page is giving the error? I want to see the trace of what's blowing up. As you scroll down the page you'll see a lot of debugging info when you use this querystring parameter and the part(s) in red are the one's I'd be interested in seeing. [/Nevermind]

    We'll get there!

    cheers,
    doug.

  • Craig O'Mahony 364 posts 918 karma points
    Jan 28, 2014 @ 15:45
    Craig O'Mahony
    0

    Hi Doug,

    It's an uncompiled site (I have never been able to compile an Umbraco build but again that's another story!), the error is actually on the content node so the umbracoDebugMode has no effect in here.

    I can give you site access if you wanna have a looky around.....

    Thanks,

    Craig

  • Craig O'Mahony 364 posts 918 karma points
    Jan 28, 2014 @ 17:07
    Craig O'Mahony
    0

    Hi Doug,

    It was me...I'm a raving idiot! Lets just leave it at that :)

    Thanks,

    Idiot Man

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 28, 2014 @ 17:23
    Douglas Robar
    0

    LOL! Truly, I LOL'd. People will be looking at me and shaking their heads :)

    No worry at all, Craig. Glad you got it sorted. Have a look at h5is.com/about and if you agree with it maybe you'll post what the problem was and how you resolved it for the benefit of the next person (there's always a 'next person'!).

    cheers,
    doug.

  • Craig O'Mahony 364 posts 918 karma points
    Jan 28, 2014 @ 17:53
    Craig O'Mahony
    0

    Oh proper, that's me alright. I've since turned my desk so that I'm facing a wall.

    Basically what I'd done is create duplicate named properties on 2 Document Types (I'd done this about the same time I was having the initial problems with the search so that was Red Herring o'clock). I'm not sure exactly how I did it to be honest as when I try to replicate my stupidity I cannot save my document type but somehow I did (I can only think that I somehow renamed the property after it's initial creation).

    So to summarise I created a text string property called pageTitle on both the parent and one of its decendants. And, obviously, I'm an idiot.

    love and peace,

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft