Convertion Script

Sep 16, 2012 at 1:10 AM
Edited Sep 16, 2012 at 1:11 AM

A script has been posted here 2-3 days ago. Just an SQL script. Some docs were promised but as usual promises are made to be broken.

So that SQL script should convert the current Forums of DNN to AF 5 (NOT the old AF forums).

But how this script should be used ? I mean not how to run it but how to do the update.

Run it to the existing forums ? Install the new ones ?

Maybe i'm not that talented than the others here but i have NO IDEA what to do.

Sep 16, 2012 at 1:46 AM
Install AF5 and run the script from the SQL menu. Not really much to document. I saw one other person report an error with the script that we haven't investigated yet.


Thanks,
Will


On Sep 15, 2012, at 5:10 PM, "zaratustra" <notifications@codeplex.com> wrote:

From: zaratustra

A script has been posted here 2-3 days ago. Just an SQL script. Some docs were promised but as usual promises are made to be broken.

So that SQL script should convert the current Forums of DNN to AF 5 (NOT the old AF forums).

But how this script should be used ? I mean not how to run it but how to do the update.

Run it to the existing forums ? Install the new ones ?

Maybe i'm not that talented that the others but i have NO IDEA what to do.

Sep 16, 2012 at 1:56 AM
Edited Sep 16, 2012 at 1:57 AM

Install AF 5 in a system that runs the old (non AF) forums module ?

Then run the SQL script ?

What exactly does the script ? Copy old data to new ?

What happens to the old forum module ?

I dont' get it. sorry ...

Thanks


Costas

Sep 17, 2012 at 1:06 AM
Edited Sep 17, 2012 at 1:16 AM

I believe a more accurate set of instructions would be 

  1. Backup/Restore your website/database into a test environment
  2. Make sure your test environment works
  3. Install AF 5.0
  4. Place the AF module on a page
  5. Click the Continue button on the newly installed module
  6. Find the MODULE ID for the new AF module (go to the Module Settings for the module on the page from step 3, look at the moduleid in the querystring/url), that will become your TARGET module id (@TargetModuleId)
  7. Find the MODULE ID for your existing DNN Forum module using the same steps as #6 but with the DNN Forum module, this will become your SOURCE module id @SourceModuleId)
  8. Edit the SQL script to change the TargetModuleId and SourceModuleId parameters in the Variables section
  9. Change the PortalID for the variables to match your portal id, if you have one website in DNN the portalid is likely 0
  10. Execute the SQL script, I used the query editor in SQL Management Studio, it would likely timeout if you tried to run it in the HOST/SQL window

I ran through these steps for a site with 38k+ users and 435k+ posts, it took 11 minutes to execute the script (though I am now tracking down/correct any errors)

Sep 17, 2012 at 1:34 AM
Edited Sep 17, 2012 at 5:44 PM

@christoc

Many Thanks for the help, i appreciated it. You helped us all.

So it was not just to run the script as i was told by the coordinators here.

 

Costas

Sep 18, 2012 at 5:35 AM

I managed to talk my way into being a coordinator here, so as I get the conversion script issues figured out I will let you guys know! Might take a day or two, but hopefully I'll be able to make some progress

Sep 18, 2012 at 11:50 AM
Edited Sep 18, 2012 at 12:19 PM

I received multiple conversion script errors:

...
 (7 row(s) affected)1Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.2Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.3Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.4Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.5Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.7Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.8Msg 2812, Level 16, State 62, Line 67Could not find stored procedure 'dbo.activeforums_DefaultGroupSettings'.

...

(1 row(s) affected)Msg 137, Level 15, State 2, Line 7Must declare the scalar variable "@PortalID".Msg 137, Level 15, State 2, Line 18Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 31Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 52Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 97Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 117Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 137Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 157Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 177Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 197Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 217Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 237Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 257Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 277Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 297Must declare the scalar variable "@SourceModuleId".Msg 137, Level 15, State 2, Line 317Must declare the scalar variable "@SourceModuleId".
(70 row(s) affected)
(220 row(s) affected)
(70 row(s) affected)Msg 515, Level 16, State 2, Line 5Cannot insert the value NULL into column 'LastTopicId', table 'mydomain.dbo.activeforums_Forums'; column does not allow nulls. UPDATE fails.The statement has been terminated.Msg 515, Level 16, State 2, Line 4Cannot insert the value NULL into column 'LastReplyId', table 'mydomain.dbo.activeforums_Forums'; column does not allow nulls. UPDATE fails.The statement has been terminated.
(20 row(s) affected)Msg 515, Level 16, State 2, Line 3Cannot insert the value NULL into column 'LastPostAuthorId', table 'mydomain.dbo.activeforums_Forums'; column does not allow nulls. UPDATE fails.The statement has been terminated.
(20 row(s) affected)
(20 row(s) affected)

 

-----end-------

Once I go to the AF on the site the control panel appears to have migrate some stuff but once you visit the page with AF this error appears:

Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Cannot find table 0. ---> System.IndexOutOfRangeException: Cannot find table 0. at System.Data.DataTableCollection.get_Item(Int32 index) at DotNetNuke.Modules.ActiveForums.ForumController.GetForumView(Int32 PortalId, Int32 ModuleId, Int32 CurrentUserId, Boolean IsSuperUser, String ForumIds) at DotNetNuke.Modules.ActiveForums.af_quickjump.BindForums() at DotNetNuke.Modules.ActiveForums.af_quickjump.OnLoad(EventArgs e) --- End of inner exception stack trace ---

 

Any assistance would be greatly appreciated.

Dan
DNN 6.2.3 

Sep 18, 2012 at 12:17 PM
Edited Sep 18, 2012 at 5:05 PM

aggiedan97

Why clutter this thread in this way ?

Open a new discussion or an issue. That way you will have better chance to get help.

Sep 18, 2012 at 5:54 PM

Aggiedan97 those are the same errors everyone else is getting, I am working on trying to come up with a fix

Sep 19, 2012 at 2:20 AM

I've uploaded a new script to the ISSUE tracker

http://activeforums.codeplex.com/workitem/1583 (the one labelled CJH)

It doesn't throw and errors, and now runs a little faster than the previous one (once you fixed the NULL errors the original script took almost an hour to run).

I am still having problems with the module actually displaying any forums, posts, etc, but I will start debugging that now. 

I imagine that I will find something wrong deep in the data and will need to update the script again, but we shall see what I find.

At least now the script runs... :D 

Sep 19, 2012 at 4:50 AM

Just a heads up. I think I have figured out the issue with the script that I uploaded.

Basically here's the scenario, after running that script, if I try to hit the page where I have the ActiveForums module on it I get an error, the problem ends up being the call to the activeforums_ForumsList stored procedure fails to return any data.

I tracked that down to the fact that there are no FORUMSETTINGS defined, coming back from the activeforums_SettingsTable function. If you go to the Control Panel (that is accessible) and you update the individual forums (edit, save) then they start appearing in the main list and things appear to start working (lots of testing left).

So. There is a work around for now, update the individual forums, that will generate the settings for each. I am going to see if I can script some of that out though and include it in the script, but hopefully in the interim that will get someone moving along

Sep 19, 2012 at 6:14 AM

the latest script I attached to the workitem (cjh v 1.2) has a fix for forumsettings

I would still recommend that you go through and configure individual forum settings after you migrate though.