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
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)
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
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>
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
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
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)
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