This is a migrated thread and some comments may be shown as answers.

[Solved] telerik-grid.js 2011.3.115 and Cisco WebVPN error

4 Answers 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Antony
Top achievements
Rank 1
Antony asked on 12 Jan 2012, 07:26 AM
After upgrading to 2011.3.1115 all worked well in development and integration environments. However, in production my grids no longer show any data.

The main difference between dev and production environments is that there is a Cisco WebVPN between me and the application. The Cisco rewrites all URLs for every javascript, style sheet, cshtml and so on.

The error that IE9 spits up is as follows

SCRIPT1003: Expected ':'
asset.axd?id=0QEAAB<snip>AD__-tARuzRAQAA, line 7 character 37496


Investigating line 7 character 37496 of asset.axd suggests that the file telerik.gid.min.js is the included script around this code:

CSCO_Util["nope"]((csco_tmp_5496=this,csco_tmp_5496.url=CSCO_WebVPN["put"](csco_tmp_5496,"url",CSCO_WebVPN["get"](n,"url")?l(unescape(CSCO_WebVPN["get"](n,"url")))[character 37496 is here]))):function(){return"#"};


maps to the following line 2073 in the non-minified telerik-grid.js:

this.url = button.url ? template(unescape(button.url)) : function() { return "#" };

And finally, the question: is there a missing semi-colon after return"#" that would cause Cisco to raise an error and stop the grid from loading?

Unfortunately, I can't test without raising a change request so I'd thought I'd raise the issue here first.

Solution?
this.url = button.url ? template(unescape(button.url)) : function() { return "#"; };



4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Jan 2012, 10:07 AM
Hi,

 The missing semicolon is part of the JavaScript minification which we are using to decrease the output size of the JavaScript files. However in that very case it should not be a problem as this is still valid JavaScript.

 If you think this may be the issue you can try using the unminified JavaScript instead. They are provided with the source code of Telerik Extensions for ASP.NET MVC (in the Source\Telerik.Web.Mvc\Scripts folder).

All the best,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Antony
Top achievements
Rank 1
answered on 13 Jan 2012, 10:10 AM
Thanks Atanas,

I reckon missing semi-colons and IE are not going play nicely at the best of times.

I will try your suggestion on the next deployment, and hope for the best. Otherwise, I'll be rolling back.
0
Antony
Top achievements
Rank 1
answered on 24 Jan 2012, 01:55 PM
And is this valid javascript?

From telerik.grid.js, line 18 to 21:

var ROWSELECTOR = "tr:not(.t-grouping-row,.t-group-footer,.t-detail-row,.t-no-data,.t-footer-template):visible",
        CELLSELECTOR = ">td:not(.t-group-cell,.t-hierarchy-cell):visible",
        FIRST_CELL_SELECTOR = ROWSELECTOR + CELLSELECTOR + ":first"
    FOCUSED = "t-state-focused";

I reckon it's missing a comma after ":first"?

According to http://www.jslint.com/ the telerik.grid.js has all sorts of problems that I'm guessing Citrix isn't happy with. Either way, I can't use the application through a Citrix firewall anymore - it worked fine on version 2011.2.914. But now I'm using features in 2011.3.115 such as right-clicking columns so can't go back.

A file compare between 2011.2.914 and 2011.3.115 shows this little weird code on line 1273 of the 2011.3.115 version:

if (options.hasErrors && options.hasErrors(data)) {
                        if(!$t.trigger(this.element, 'error', {
                                XMLHttpRequest: xhr,
                                textStatus: 'modelstateerror',
                                modelState: data.modelState
                            })) {
                            options.displayErrors(data);
                        }
                        return;B

What is that "B" doing there after the return?
0
Atanas Korchev
Telerik team
answered on 24 Jan 2012, 02:57 PM
Hello,

 You are absolutely right. Both issues are invalid JavaScript. Find attached the fixed minified and source version of telerik.grid.js. Let me know if there are other problems.

Regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Antony
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Antony
Top achievements
Rank 1
Share this question
or