SP2013 Enterprise, custom master page using skel.js and jquery

Recently users have started receiving an error when trying to access the item menu revealed by the ellipses next to an item in a list. The error (in IE) is "TypeError: Object doesn't support property or method 'hoverIntent'" and it appears in the dialog box where the menu should be. I've run the IE debugger and caught a few errors in it but not being a js expert I'm having trouble making sense of them. The errors are "'OpenCalloutAndSelectItem' is undefined" and "'ShowMenuForTrOuter' is undefined"

Has anyone seen this before? Googling the TypeError one produced a lot of results about jquery but I don't know what that would have to do with SharePoint context menus (I certainly didn't modify their functionality intentionally) but the other two produce basically no helpful results at all.

Edit: I've found out that it may have something to do with a third party solution we have installed, IGC's Brava for SharePoint. It seems the hoverIntent function that SharePoint is looking for is installed by Brava. They dug up an older support case citing the same error due to a conflicting jQuery library, and recommend removing the reference to it in the master page which I believe would just let the Brava jQuery library take over. It sounds like it would be a simple fix but something is nagging at me saying it's not the best solution, because if we ever uninstall Brava we will no longer have jQuery until it's manually added, correct? Or am I way off track with this solution?


Update: Comments below are informative, from the comments: The solution was to remove the jQuery reference in the master page and let the Brava solution take over. Although this did seem to cause some other errors.

Original: The JQuery in the custom master page can easily be modifying anything on the html page including the standard SharePoint context menus.

JQuery generally works by selecting an object or objects first that a function will then be applied to.

$('#id_of_some_html_element').somejqueryfunction(some parameters...)

from the first error I would say whatever $('#id_of_some_html_element') is selecting it does not have the .hoverIntent function/method or property... or maybe the selection $('#id_of_some_html_element') is not actually finding the object on the screen at all.

With that said I think JQuery has a .hover but not a .hoverIntent I do not know if skel.js provides the plug in for hoverIntent or not. But googling for a JQuery plugin with hoverIntent does find this http://cherne.net/brian/resources/jquery.hoverIntent.html

if your site is really using that one or not I do not know.

I would first check the custom master page and make sure the js include paths are correct and the js files exist. I would open up the skel.js files and verify to make sure hoverIntent is not defined in them skel.js if not I would add the hoverIntent plugin for JQuery in the master page and try that.

With that said I think OpenCalloutAndSelectItem is part of SharePoint javascript API and if that's undefined... Then I would first check the custom master page for a small typo that is stopping the other javascript files from being included - a missing closing tag on a script tag, or something like that.

  • As far as I can see there's nothing interrupting the js files from being loaded with one exception (logged in Fiddler) "GET /_catalogs/masterpage/Site/js/jquery.min.map HTTP/1.1" is returning a 404. Unfortunately I don't see how this one could be connected. I have some more information about the situation from another party, I'll add it to my question, maybe it will help spot the missing/bad function. By the way, skel.js doesn't include hoverIntent as far as I can see. – thanby Jun 6 '14 at 17:35
  • JQuery is usually minified when deployed so it will have variables like a, b, c instead of meaningful words for variables. The dev tool you are using is probably expected this map file that would allow it to give you the more meaningful variable names when looking inside the JQuery source. A user not using the dev tool wouldn't have the file requested and so would not get the 404. – axawire Jun 6 '14 at 18:18
  • I agree "GET /_catalogs/masterpage/Site/js/jquery.min.map HTTP/1.1 returning a 404" is unrelated to your problem. – axawire Jun 6 '14 at 18:19
  • If you remove the JQuery reference from the master page and the Brava for SharePoint solution is not incorporated on every page then any page that was expecting JQuery will no longer have it automatically from the master page. – axawire Jun 6 '14 at 18:32
  • 1
    I would test the solution with JQuery commented out in the master page first, see if it even works. I think if things break at a later date because Brava is removed it is going to be easier to find the comment/problem in the master page than issues that show up because .ready() isn't working properly when JQuery was loaded after the javascript check on the couple of pages that end up using it. bugs.jquery.com/ticket/2509 they closed the bug, but I think they basically gave ways to work around it and documented it as behavior by design. – axawire Jun 6 '14 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.