Updated Telerik Web UI version - breaks

1 Answer 572 Views
Calendar
Ahmed
Top achievements
Rank 1
Iron
Ahmed asked on 10 May 2022, 11:32 AM | edited on 10 May 2022, 11:48 AM

We have a very old ASP.NET web forms website and it was using a 6+ year old version of the Telerik Web UI controls.

In aid of resolving one of our issues where the calendar control "jumps" randomly when creating a new entry, we were advised to upgrade to a newer version of the control (2022.1.302.45).

 

I installed the Telerik tools and then removed the old references of the control and added the NEW references.

Immediately it breaks the page.

I get the following JS errors when I try to click on the calendar view/grid:


       
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED
widget_embed_libraries_191.js:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED
Calendar_XLogs.aspx:1558 
        
       Uncaught SyntaxError: Unexpected token ';'
rsSprites.png:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
widget_embed_191.css:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED
widget_embed_libraries_191.js:1 
        
      
        
        
      
        
      
       
        
       Failed to load resource: net::ERR_NAME_NOT_RESOLVED

  

 

 

 

Uncaught TypeError: Cannot read properties of undefined (reading 'open') at window.radopen (ScriptResource.axd?d=yK6qhJVfE0myfV1ijwDRg-fVrTRo-HZ-D2o9yhz8hJaIb7KWAwHYA1TrIDU15KJWCq4MuKg8c6a88RTJAnELh5IUQUlgOGiGuL0CJP9mBCdrzbiyNqx_HxsYXXauKkamF_aF6PVXTYvgWhjtoGGkxRlhuV01&t=37e10300:17:10) at <anonymous>:1:12 at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:346:38) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:351:22) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:351:22) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:351:22) at Sys$_ScriptLoader$_nextSession [as _nextSession] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:373:14) at Sys$_ScriptLoader$_loadScriptsInternal [as _loadScriptsInternal] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:360:18) at Sys$_ScriptLoader$_nextSession [as _nextSession] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:373:14) at Sys$_ScriptLoader$loadScripts [as loadScripts] (ScriptResource.axd?d=YSJbrBwjY8OR41m2W_4X7pNCN_IrCO12e5c5XkC9yenVskAQME3vxdKWLQ8avUdH4dWkimd9z08vfIUCLRj0_nLwlDYrDMTTwGUeZRDdjEa7_s3awntJLemQ9h0AZJhRSt-5JWvNnx8iOM9iZkCs8KPqhi3nQU2bjG7xR__FX-F52cvx0&t=49337fe8:262:18)

 

Any ideas where to go from here?

Ahmed
Top achievements
Rank 1
Iron
commented on 12 May 2022, 04:40 AM

Anybody?
Rumen
Telerik team
commented on 12 May 2022, 10:07 AM

The calendar error is most likely triggered because of the first error you get on the page: 

Failed to load resource: net::ERR_NAME_NOT_RESOLVED
widget_embed_libraries_191.js:1 

 

The browser is unable to resolve the URL pointing to the widget_embed_libraries_191.js script and this breaks any subsequent JavaScript execution on the page including the scripts of the Telerik controls.

The ERR_NAME_NOT_RESOLVED error is generic and discussed in this popular StackOverflow forum: Chrome give error **Failed to load resource: net::ERR_NAME_NOT_RESOLVED** while other browser load images. I hope that you'll find the answer which helps you to resolve the issue on your side.

If you are unable to resolve it, please try to isolate the problem in a simple runnable project and send it via a support ticket for research on our side. Thank you!

 

Ahmed
Top achievements
Rank 1
Iron
commented on 13 May 2022, 07:52 AM

Thank you. I am not sure where that library comes from as this was not in the original solution and was working fine with the very old version of the control until I replaced the DLL with a newer version.
Ahmed
Top achievements
Rank 1
Iron
commented on 13 May 2022, 07:56 AM | edited

So even after removing that reference, the page still breaks with the same error as above. This has nothing to do with not finding the js library you had highlighted.

 

unfortunately cannot break the project into something easy to send over due to the nature of the project itself. Let's work together on how best we can see what is happening.

 

As mentioned, using the very old outdated Telerik control works. As soon as I swap out to use the NEW version, it breaks.

Ahmed
Top achievements
Rank 1
Iron
commented on 13 May 2022, 08:08 AM | edited

Another thing, if it helps, is when I click on the console to navigate to the error in the browser dev tools, it takes me here to the rendered ScriptResource:

 

 

obviously this is something that gets rendered by the system and not me.

When I try to hit a breakpoint in the browser and see what GetRadWindowManager() does, it returns "undefined"

And yes, there is a Rad Windows Manager script on the page. Nothing changed except moving to a newer version of the DLL

Rumen
Telerik team
commented on 13 May 2022, 10:56 AM

Hi again,

Thank you for

There are three forums on the same issue which might help you find the reason for the problem after the upgrade:

On a side note, if you are unable to isolate the problem, there is another way to share the problem by capturing a Fiddler Jam log. The capture will provide a lot of info easily and allow us to investigate further. Keep in mind that starting from a blank page or at least navigating to your page via the address bar is crucial for capturing all requests and responses:

https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/common-capture-issues-with-fiddler-jam

Best regards,
Rumen

  
Ahmed
Top achievements
Rank 1
Iron
commented on 13 May 2022, 04:02 PM

Thank you. Yes I have seen those links before but no avail or they are not applicable. 

I will try and post the fiddler jam log.

Just surprised that it works on the very old version but after swapping the DLL for the newer one, it fails.

Ahmed
Top achievements
Rank 1
Iron
commented on 13 May 2022, 05:04 PM | edited

Here is the Fiddler Jam: <the admin removed the link to the Fiddler Jam log>
Rumen
Telerik team
commented on 16 May 2022, 08:26 AM | edited

Thank you for the Fiddler Jam capture. I examined the page and noticed a number of errors which are not Telerik related. Can you please go and comment out the top.document.getElementsByTagName('frameset')[0] line in the pageLoad method since the reference is undefined:


 function pageLoad()
      {
          top.document.getElementsByTagName('frameset')[0].rows = '34px,*'

Save the file and refresh the page to see if the errors will go away.

Also make sure that the syntax of the value  '34px,*' is supported by the browser's JavaScript engine.

Meanwhile, I will continue to investigate the other errors.

Ahmed
Top achievements
Rank 1
Iron
commented on 16 May 2022, 02:39 PM

Thank you. Even after commenting out, it still has the same problem.
Rumen
Telerik team
commented on 17 May 2022, 10:56 AM

I examined the next error in the list 

Calendar_XLogs.aspx:formatted:1559 Uncaught SyntaxError: Unexpected token ';'

and noticed the following unsupported syntax:

"beforeShow":document.documentElement.focus();,


The problem is that the beforeShow event of RadWindow expects a function name. What you can do is to use a function name as a value or try with an anonymous function:

 

"beforeShow":function(){document.documentElement.focus();},

Fixing it this should fix the dialog open issue with RadWindow.

Another error is Uncaught TypeError: Cannot read properties of undefined (reading 'document') and it is due to an invalid reference returned by top.frames["ContentFrame"] inside the function StartLoadingAnimation. This is not related to the Telerik control.

The Uncaught TypeError: Cannot read properties of undefined (reading 'frames') error is due to incorrect reference to the top.frames["ContentFrame"].frames["_view"] frame in the HideLoadingImage function.

Yet another error TypeError: Cannot read properties of undefined (reading 'eventArgsToSend') is due to undefined reference to top.frames["ContentFrame"].eventArgsToSend !== undefined && top.frames["ContentFrame"].eventArgsToSend

 

Ahmed
Top achievements
Rank 1
Iron
commented on 17 May 2022, 02:08 PM | edited

Thank you.

The "beforeshow" you are referring to is not in the code but rather something emitted from the Telerik control. How would I overcome this?

Could this be here somewhere?

 


 <telerik:RadWindowManager ID="radWindowManager" runat="server">
                <Windows>
                    <telerik:RadWindow ID="radDialog" runat="server" Title="" Width="600" Height="644"
                        InitialBehaviors="None" Behaviors="None" BorderWidth="0" KeepInScreenBounds="true"
                        VisibleOnPageLoad="false" VisibleStatusbar="false" VisibleTitlebar="false" Skin="Web20" EnableEmbeddedBaseStylesheet="false"
                        NavigateUrl="" Modal="true" DestroyOnClose="false" ShowContentDuringLoad="false"
                        OnClientClose="ReloadSchedule"  OnClientBeforeShow="document.documentElement.focus();">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
            <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="100%"
                RowHeight="22" Skin="Web20" EnableEmbeddedSkins="false" SelectedView="MonthView"
                DayStartTime="07:00:00" DayEndTime="18:00:00" WorkDayStartTime="07:00:00" WorkDayEndTime="17:00:00"
                HoursPanelTimeFormat="hh:mm tt" TimeLabelRowSpan="4" MinutesPerRow="15" NumberOfHoveredRows="1"
                TimelineView-UserSelectable="false" MonthView-AdaptiveRowHeight="false" MonthView-VisibleAppointmentsPerDay="2"
                MonthView-HeaderDateFormat="MMMMMMMMM, yyyy" AdvancedForm-Enabled="false" AdvancedForm-ZIndex="-1"
                StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true"

                OnClientAppointmentInserting="InterceptNewAppointmentEvent"
                OnClientAppointmentClick="InterceptAppointmentClickEvent"
                OnClientAppointmentDoubleClick="InterceptAppointmentClickEvent"
                OnClientAppointmentEditing="InterceptAppointmentEditingEvent"
                OnClientAppointmentDeleting="ConfirmAppointmentDelete"
                OnClientAppointmentMoving="AdjustTargetSlotForScroll"
                OnClientAppointmentMoveEnd="ConfirmAppointmentMove"
                OnClientAppointmentResizeEnd="ConfirmAppointmentDurationChange"

                OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                OnAppointmentDelete="DeleteAppointment"
                OnAppointmentUpdate="UpdateAppointment"
                OnAppointmentContextMenuItemClicking="RadScheduler1_AppointmentContextMenuItemClicking"

                OnNavigationComplete="NavigationComplete"

                DisplayDeleteConfirmation="false" DisplayRecurrenceActionDialogOnMove="false"
                >
                <AppointmentContextMenuSettings EnableDefault="true" />
                <TimelineView SlotDuration="00:15:00" GroupingDirection="Vertical"  />
                <AppointmentContextMenus>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerAppointmentContextMenu1" runat="server">
                        <Items>
                            <telerik:RadMenuItem Text="Duplicate" Value="Duplicate">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadSchedulerContextMenu>
                </AppointmentContextMenus>
            </telerik:RadScheduler>

Ahmed
Top achievements
Rank 1
Iron
commented on 18 May 2022, 04:16 AM

This fixed the issue. Thank you
Rumen
Telerik team
commented on 18 May 2022, 07:39 AM

You are welcome, Ahmed! I converted my comment about the value of the OnClientBeforeShow property to be the thread answer. 

Keep up the good work!

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 17 May 2022, 03:23 PM

The code in question is generated from the value of the OnClientBeforeShow property:

 OnClientBeforeShow="document.documentElement.focus();" 

 

this syntax is not supported and the value should be a function name as for example the value of the OnClientClose property is, e.g. OnClientClose="ReloadSchedule".

Tags
Calendar
Asked by
Ahmed
Top achievements
Rank 1
Iron
Answers by
Rumen
Telerik team
Share this question
or