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

MicrosoftAjax.js throwing an error

8 Answers 1362 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 08 Aug 2019, 05:06 PM

I have a RadGid with an inline edit from that contains a RadEditor

on adding a new row the RadEditor is no longer displayed and a javascript error is thrown from the Telerik.Web.UI.WebResource

"Uncaught TypeError: h is not a constructor

var a = g ? new h(g) : new h"

 

This was working with out issue when we initially upgraded to Telerik.Web.UI, Version=2019.1.215.0. 

Is this a bug that has popped up in resource that is downloaded  for MicrosoftAjax.js or should at something else?

8 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 08 Aug 2019, 06:33 PM
Uncaught TypeError: h is not a constructor
    at Sys.Component.create (Telerik.Web.UI.WebResource.axd:6)
    at <anonymous>:8:5
    at Sys._Application.add_init (Telerik.Web.UI.WebResource.axd:6)
    at <anonymous>:1:17
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd:15)
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd:15)
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd:15)
    at Sys._ScriptLoader._nextSession (Telerik.Web.UI.WebResource.axd:15)
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd:15)
    at Sys._ScriptLoader._scriptLoadedHandler (Telerik.Web.UI.WebResource.axd:15)
0
Rumen
Telerik team
answered on 09 Aug 2019, 11:38 AM
Hi Tim,

Thank you for reporting this error!

I am not aware of it and I tried to replicate it in the EditItemTemplate demo, but without success.

Are you able to reproduce the problem in the demo?
The demo runs the latest official version of the controls, which is 2019.2.514. Can you upgrade to it and try to replicate the issue?

Is your scenario similar to the demo or different? If it is different, can you provide a simple runnable project which demonstrates it, in case the problem happens even with the latest version of Telerik.Web.UI?

I also found the following third-party blog post for the same error message: It might be worth it to give it a look - https://www.broculos.net/2013/11/h-is-not-constructor-javascript-error.html.

Thank you!

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jeff
Top achievements
Rank 1
answered on 09 Aug 2019, 07:38 PM

I was able to remove the error by removing the ToolBarMode Attribute

 

 <telerik:RadEditor ID="radEditor" runat="server" Height="50" ContentAreaMode="Div"
                                EditModes="Design" ToolbarMode="ShowOnFocus" BorderWidth="0" AutoResizeHeight="true"
                                OnClientCommandExecuting="CommentEditor.OnClientCommandExecuting"
                                ContentFilters="RemoveScripts,StripCssExpressions,StripDomEventAttributes">
                                <Tools>
                                    <telerik:EditorToolGroup>
                                        <telerik:EditorTool Name="Undo" />
                                        <telerik:EditorTool Name="Redo" />
                                        <telerik:EditorSeparator Visible="true" />
                                        <telerik:EditorTool Name="Bold" />
                                        <telerik:EditorTool Name="Italic" />
                                        <telerik:EditorTool Name="Underline" />
                                        <telerik:EditorSeparator Visible="true" />
                                        <telerik:EditorTool Name="InsertUnorderedList" />
                                        <telerik:EditorSeparator Visible="true" />
                                        <telerik:EditorTool Name="AjaxSpellCheck" />
                                    </telerik:EditorToolGroup>
                                </Tools>
                                <ContextMenus>
                                    <telerik:EditorContextMenu TagName="*">
                                        <telerik:EditorTool Name="Cut" />
                                        <telerik:EditorTool Name="Copy" />
                                        <telerik:EditorTool Name="Paste" />
                                    </telerik:EditorContextMenu>
                                </ContextMenus>
                                <Languages>
                                    <telerik:SpellCheckerLanguage Code="en-US" Title="English" />
                                </Languages>
                            </telerik:RadEditor>

0
Rumen
Telerik team
answered on 12 Aug 2019, 10:20 AM
Hi Tim,

Thank you for the extra details!

On my side the latest version of RadEditor works with no errors when the ToolbarMode property is set to ShowOnFocus. If this is a regression, can you please help me to reproduce it with the latest version 2019.2.717?

Can you please perform yet another test by upgrading to version 2019.2.717 and testing it?

Does the ShowOnFocus toolbar issue still persist?

If yes, can you provide a simple runnable project or just the aspx page/codebehind to replicate it. Thank you!

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jeff
Top achievements
Rank 1
answered on 14 Aug 2019, 02:49 PM
I was able to get it working correctly with the original code in 2019-q1 and q2 by recompiling the source code.  
0
Rumen
Telerik team
answered on 15 Aug 2019, 08:29 AM
Thank you very much for the update!

This leads me to think that the problem is not related to the official builds of R1 and R2 2019 releases so no other users will experience it.


Nevertheless, if somebody else experiences this problem, let's please share the steps/code to reproduce it so that we can reproduce, debug and fix it. Thank you!

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Valli
Top achievements
Rank 1
answered on 17 Dec 2019, 08:53 PM

Hi Rumen,

I am facing same issue. I have a RadTabScript with in the page to display details of a record in different tabs. Upon clicking on any record, the following error message is getting popped up and thus tabs aren't working.

Uncaught TypeError: h is not a constructor
    at Sys.Component.create (ScriptResource.axd:5)
    at Array.<anonymous> (DlgCowRecord.aspx:1558)
    at ScriptResource.axd:5
    at Sys._Application._raiseInit (ScriptResource.axd:5)
    at Sys._Application.initialize (ScriptResource.axd:5)
    at b (ScriptResource.axd:5)
    at HTMLDocument.a (ScriptResource.axd:5)

0
Rumen
Telerik team
answered on 18 Dec 2019, 08:53 AM

Hi Valli,

Is your app running the latest version of Telerik UI for ASP.NET AJAX? If not, please make a backup, upgrade the Telerik.Web.UI.dll assembly and retest.

If the problem still persists in the latest version, can you please provide the RadTabStrip and RadEditor configurations or even better a simple runnable project so that we can debug it?

Have you tried the different options of the RadEditor ToolbarMode property to see whether some of them will resolve the issue?

 

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Ajax
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Rumen
Telerik team
Valli
Top achievements
Rank 1
Share this question
or