Search Refinement Panel Web Part “Show More” Link Not Working

I recently discovered that the “Show More” link on the Search Refinement Panel web part had stopped working, seemingly out of the blue.  With a bit of debugging I discovered that the functions defined in the onclick event:


onclick="SearchEnsureSOD();ToggleRefMoreLessFilters(this, true);"

were returning “Object Expected”.  For some reason the functions were no longer defined.

I eventually figured out that the problem was that I had removed the Search Box web part from the page and replaced it with my own custom search box.  Apparently the Search Box web part is required on the same page as the Refinement Panel web part, as it injects JavaScript into the page that is used by the Refinement Panel.  I fixed the problem by adding the Search Box web part back onto the page and hiding it.

Comments

14 responses to “Search Refinement Panel Web Part “Show More” Link Not Working”

  1. Allison Avatar
    Allison

    Awesome find…saved me hours.

  2. srikanth Avatar
    srikanth

    Thank you very very very much

  3. Sir D. Avatar

    Thanks a bunch, was running into a similar issue with “SearchEnsureSOD()” missing when clicking search results. Saved me quite a bit of time researching the issue on my own.

  4. NvdW Avatar
    NvdW

    Thanks! Exact same problem on our intranet. Solved now.

  5. NK Avatar
    NK

    Thanks! i had exact same problem. you saved me 🙂

  6. Leroy Avatar
    Leroy

    Well done. This saved me a bunch of screwing around. Cheers!

  7. Tanya Avatar
    Tanya

    Really, really helpful! Thank you for the resolution – save me lots of hours and efforts, too!

  8. Dima Avatar
    Dima

    Saved me a time too! Thanks!

  9. Bastiaan Avatar
    Bastiaan

    Thanks! Unbelieveable that this webpart is required on the page to be able to fully use the navigators on the left. Happy to solve this annoying javascript error!

  10. Saurabh Avatar
    Saurabh

    Hi,
    I am working on Showmore/Showfewer of refinement panel. But I want this functionality on Mouse hover. I tried by adding $(this).attr(“onmouseover”,”SearchEnsureSOD();ToggleRefMoreLessFilters(this, true)”). but it doesnt work. If I add this same attr through developers tool of IE it works.

    Thanks for help in advance..

    1. Chris Coulson Avatar

      If it works through IE developer tools, it should be fine. It’s probably just being added to the page wrong. Maybe the order’s wrong? Are you sure JQuery is loaded before this gets loaded? You also might want to try the Chrome development tools for debugging JavaScript – I find them a lot easier to use.

  11. Andy Burns Avatar

    Thank you, that’s a weird one!

  12. […] different metadata properties, this was all pretty standard stuff. A bit of a check on Google found this interesting post by Chris Coulson. The short if it is that the Refinements panel uses JavaScript that is loaded by the Search Box web […]

  13. yvonne Avatar
    yvonne

    Thank you. Saved me a lot of pain !

Leave a Reply

Your email address will not be published. Required fields are marked *