Script error "JQuery.browser undefined"

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/5/2013 5:23:33 AM
Gravatar
Total Posts 6

Script error "JQuery.browser undefined"

Hello
From Revision 4988 Script stops with an error message "JQuery.browser undefined".

/* begin Menu */

jQuery(

function () {

if (!jQuery.browser.msie || parseInt(jQuery.browser.version) > 7) return;

I think the problem with jquery migrate plugins. In the 4986 revision it is loaded from the site jquery and subsequent revisions of it loaded from jqmojo. Because of this, stop all scripts run on the page. Help solve the problem.
Thank you.

 

2/5/2013 9:07:22 AM
Gravatar
Total Posts 18439

Re: Script error "JQuery.browser undefined"

Hi,

If you are using custom scripts that are not compatible with the latest version of jQuery then you can add this in layout.master:

<portal:ScriptLoader ID="ScriptLoader1" runat="server" IncludeJQueryMigrate="true" />

This will include an extra script that restores the things that have been removed from jquery 1.9

Artisteer skins need this now because their script is not yet compatible.

If you are using well known jquery plugins you might check for the latest versions to see if they have been updated to jQuery 1.9.

I updated several plugins included with mojoPortal including superfish, colorbox, and cycle plugins.

If you are using a menu with mojosuperfish.js you can make it compatible by changing to mojosuperfish150.js

​Hope that helps,

Joe

2/6/2013 12:13:27 AM
Gravatar
Total Posts 6

Re: Script error "JQuery.browser undefined"

Hi, Joe.
Thanks for the reply. What you write I understand. I probably poorly described problem. Yesterday you did not answer. Today I decided to experiment and find out the cause of the problem.
And so, what I'm doing:
1. In TortoiseHg  updated files to revision 4986 (description: "add support for jquery migrate plugin for backward compat")
2. In layout.Master write <portal:ScriptLoader ID="ScriptLoader1" runat="server" includeJQueryMigrate="true" />
3. Rebuild the solution and run the project. All without errors. All scripts work.
4. In TortoiseHg  updated files to revision 4988 (description: "fix artisteer skins broken by jquery upgrade some work on support for Artisteer 4.1")
5. Rebuild the solution and run the project. Execution stops jscript error ("JQuery.browser undefined")
6. In layout.Master write <portal:ScriptLoader ID="ScriptLoader1" runat="server" includeJQueryMigrate="false" /> and add the line
<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"> </ script>
7. Save layout.Master and run the project. All without errors. All scripts work.
Conclusion: When you load a local script, then there are errors, and when it is downloaded from the website JQuery, all scripts run without errors.
In the 4986 revision it is loaded from site JQuery. In the 4988+ revisions  script loaded from the directory /jqmojo
Now, I think all clearly explained. I hope this will help in solving the problem.

PS: I use skins "artisteer31-hovermenu".

2/7/2013 10:32:29 AM
Gravatar
Total Posts 18439

Re: Script error "JQuery.browser undefined"

Try the latest version, it is working on our demo site. I had to change to make it load the jquery migrate script from a local folder because the one at code.query.com has a bad ssl certificate and it failed to load on secure requests.

All the Artisteer skins need it and the demo site is working correctly with Artisteer skins so it seems to be working correctly for me.

However if you find you need to load it from the jquery site that is up to you.

2/8/2013 2:26:57 AM
Gravatar
Total Posts 6

Re: Script error "JQuery.browser undefined"

Hi, Joe.
I understand the problem. In ScriptLoader.cs path to the script specified as:
private string jQueryMigrateUrl = "/ ClientScript/jqmojo/jquery-migrate1-0-0.js";

but the ability to run a site in a virtual folder. The path to the site: http://localhost/myproject/....

Accordingly, it would be correct for me:

private string jQueryMigrateUrl = "/myproject/ClientScript/jqmojo/jquery-migrate1-0-0.js";. That's how it works.
The script does not load because of incorrectly path.

 Joe, I know how to solve the problem, but do not want to make changes to the source code (guided yours instructions and respect other people's work).

I think that you will do it better than me.

2/8/2013 9:56:29 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Script error "JQuery.browser undefined"

Looks like it should be changed to:

private string jQueryMigrateUrl = Page.ResolveUrl("~/ClientScript/jqmojo/jquery-migrate1-0-0.js");

2/8/2013 10:39:40 AM
Gravatar
Total Posts 18439

Re: Script error "JQuery.browser undefined"

This is now fixed in the source code repository and I've patched the 2.3.9.5 release.

Thanks,

Joe

You must sign in to post in the forums. This thread is closed to new posts.