A fix for DotNetNuke ScriptManager Errors, Ajax issues

A fix for DotNetNuke ScriptManager Errors, Ajax issues

 

This fix does not apply to DNN 4.8.2 or greater, 4.8.2 has a fix for the issue

yesterday I posted that I had found a fix for the issues with the Ajax ScriptManager issues that have been occuring with DNN 4.7 and greater.

Well here it is! It's not pretty, but from my testing so far it appears to fix the problems I've been having here on www.ChrisHammond.com

THIS IS ONLY A TEMPORARY FIX. Please use this at your own risk, I provide it here just as am immediate fix that worked for me, test in your environment before making production changes!

To use this fix you're going to have to recompile the DotNetNuke Source package you can download from www.dotnetnuke.com. I've only tested this with 4.8.1 source, but I don't believe there should be any issues if you're trying to recompile 4.7.0 or 4.8.0. Here are the two files you need to make changes to.

source/library/components/framework/Ajax.vb

Line #148
        Public Shared Sub RegisterScriptManager()
            If Not IsEnabled() Then
                AddScriptManager(m_Page)
            End If
        End Sub

'ADDED THE FOLLOWING FOR THE FIX
        Public Shared Sub RegisterScriptManager(ByVal objPage As Page)
            If Not IsEnabled() Then
                AddScriptManager(objPage)
            End If
        End Sub


source/website/default.aspx.vb

Line #209
'register page with AJAX
'AJAX.RegisterPage(Me)
AJAX.RegisterScriptManager(Me)

Once you make these changes and recompile, you should get a new DotNetNuke.Dll file, I grabbed the one out of my source/library/bin folder, and deployed that to the BIN folder on my production website. I also copied the default.aspx.vb file to the root of my production website.

When you compile you can compile in debug or release mode, I chose to compile in release mode.

If you have any questions feel free to post them here.

This fix does not apply to DNN 4.8.2 or greater, 4.8.2 has a fix for the issue

Recent Comments

Comment Avatar

Hi Chris, The scriptmanager error was the first thing that greeted me after upgrading to 4.8.1 today. Excellent work if you've managed to fix this!. Now.. how can those of us who can't compile get hold of the relevant dll or other bits? Is it just one file we need?

Posted By: Rob Ax on Feb 2008
Comment Avatar

I would love for you to email me your DLL and default.vb file

Posted By: Brad B on Feb 2008
Comment Avatar

Chris! thanks for the fix. i think it is working for me. are you aware that each time you post there are multiple entries on your rss feed?

Posted By: Rafe Kemmis on Feb 2008
Comment Avatar

Yes if you can email a .dll that would rock! I would imagine since it's open source you should be able to, right? This is a welcome update.

Posted By: Rick Ryno on Feb 2008
Comment Avatar

Chris! thanks for the fix. i think it is working for me. are you aware that each time you post there are multiple entries on your rss feed?

Posted By: Rafe Kemmis on Feb 2008
Comment Avatar

How much testing has been done with this fix? We have made this change in our code-base for 4.7.0 and it seems that it caused another bug (maybe unrelated) with the SolPart menu used for the action links to stop working after a period of time. Does this use AJAX?

Posted By: Michael S on Mar 2008
Comment Avatar

I've been using this "fix" for the past few weeks without any issues here on this site. We also have it in place on a few other production sites as well.

Posted By: Chris Hammond on Mar 2008
Comment Avatar

Hi Chris, would you mind to email the fixed files to me also. I am having this problem and it is very annoying. Thanks

Posted By: Mark Townsend on Mar 2008
Comment Avatar
Are you saying to REPLACE the RegisterScriptManager method, or OVERLOAD it?
Posted By: Eric Maxwell on Apr 2008
Comment Avatar
Eric, my suggestion is to Upgrade to DNN 4.8.2. If you can't do that, create an overload for the method.
Posted By: Chris Hammond on Apr 2008

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your comment here.
If you can't type DNNRocks in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond

Chris Hammond is a father, husband, leader, software developer, photographer and car guy. Chris focuses on the latest in technology including artificial intelligence (AI) and has spent decades becoming an expert in ASP.NET and DotNetNuke (DNN) development. You will find a variety of posts relating to those topics here on the website. For more information check out the about Chris Hammond page.

Find me on Twitter, GitHub and LinkedIn.