Copied to clipboard

Flag this post as spam?

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


  • overflew 87 posts 110 karma points
    Nov 23, 2010 @ 22:25
    overflew
    0

    Backoffice search autocomplete - Issue with extended words

    Hi there,

    I'm having an issue with the search autocomplete in the top left - If I search for a word & get results (e.g. "Sam") then continue that word (e.g. "Samuel"), I get no further results. In the Javascript console, I get an error like so:

    1. Uncaught TypeError: Object 4778 has no method 'indexOf'

      Extended details:
      1. onChange

        Object '4478' is the first result returned by the first search ("Sam"). I have tested this occurring in IE8 / FF / Chrome, and have tested there are results for the extended word ("Samuel") when searched from it's other title words, and in the search dialog (/umbraco/dialogs/search.aspx).

         

        I'm using v4.5.2

        Any help appreciated, thanks.

  • Chester Campbell 98 posts 209 karma points
    Nov 03, 2011 @ 22:18
    Chester Campbell
    0

    Did you get any resolution to this issue? I have experiencing the same thing with Umbraco v4.7.0.

  • Sam Moore 27 posts 112 karma points
    Jan 19, 2012 @ 20:54
    Sam Moore
    0

    my fix was this:

     

    go to /umbraco_client/Application/JQuery/jquery.autocomplete.js

    open that bad boy up and edit the line in matchSubset that looks like this:

     

    var i = s.indexOf(sub);

     

    so that it looks like this (essentially you're having it do a lookup on the s object to see if it can find any indexOf method, BEFORE it tries to use it. I imagine there is a bug somewhere in the cache mechanism that causes s to be passed improperly to the matchSubset function, but I don't want to waste time debugging it. This will fix it:

    var i = s["indexOf"] ? s.indexOf(sub) : -1;

    You may have to go to your ~/App_Data/TEMP/ClientDependency folder and delete all the files then do a hard refresh (ctrl-R / F5) in the backoffice to clear out the cached JS file before the error goes away.

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies