YAFLogo

3KyNoX
  • 3KyNoX
  • 53% (Neutral)
  • YAF Forumling
11 years ago
Hello,

First, Thanks for this usefull post but i get stuck using my main Yaf Forum inside DNN after installation;

I did all the first parts :

- backed up my existing yaf tables (deathblow.bak) from sql server management studio

- restored it on a fresh 'deathblow' db from sql server management studio

- delete all folders and files of yaf,

- replaced them with new dnn.

- executed the dnn installation on deathblow db

- created new users while dnn installation (hostadmin and siteadmin)

- installed the yaf dnn module.

- added a forum page in dnn

- installed yaf module on this page (at this point, yaf wizard asking for web.config yaf password, etc...) --> completed

- executed without any errors the script to import users inside dnn tables (changed script to point on 'deathblow' db) from sql server management studio

- opened dnn forum page while logged at hostadmin

At this point, there is a logout and i get the following yaf error :

Quote:

Error

A system error happened. Thanks to contact administrator.

Continue Link...

After it oppen the forum with correct topics and forums inside but unlogged at this point.

Then, I try to log back hostadmin account and go back on forum and getting same error.

Also, when i try to reset the password of an imported user i get this error too :

Quote:

There was an error retrieving your password. No password was sent.

Here's the script detail :

Quote:

begin tran

DECLARE @ApplicationId uniqueidentifier

--Get DNN .NET Membership ApplicationID

SELECT @ApplicationId = ApplicationId

FROM [DeathBlow].[dbo].[aspnet_Applications]

INSERT [DeathBlow].[dbo].[aspnet_Users] (ApplicationId,UserId,UserName,LoweredUserName,IsAnonymous,LastActivityDate)

SELECT @ApplicationId, m.Userid, m.Username, m.UsernameLwd,0,

CASE

WHEN m.LastActivity IS NULL THEN getdate()

ELSE m.LastActivity

END

from [DeathBlow].dbo.yaf_prov_Membership m

Left JOIN [DeathBlow].[dbo].[aspnet_Membership] mm on m.UserID = mm.UserID

Where mm.UserID IS NULL

--INSERT into DNN .NET Membership Membership table the required Information

--from yaf membership

INSERT [DeathBlow].[dbo].[aspnet_Membership] (ApplicationId,UserId,[Password],PasswordFormat,PasswordSalt,Email,LoweredEmail,PasswordQuestion,PasswordAnswer,IsApproved,IsLockedOut,LastLoginDate,LastPasswordChangedDate,LastLockoutDate,FailedPasswordAttemptCount,FailedPasswordAttemptWindowStart,FailedPasswordAnswerAttemptCount,FailedPasswordAnswerAttemptWindowStart,Comment,CreateDate)

SELECT @ApplicationId,m.UserID,m.[Password],m.PasswordFormat,m.PasswordSalt,m.Email,m.EmailLwd,m.PasswordQuestion,m.PasswordAnswer,m.IsApproved,0,

CASE

WHEN m.LastLogin IS NULL THEN '1754-01-01 00:00:00.000'

ELSE m.LastLogin

END,

CASE

WHEN m.LastPasswordChange IS NULL THEN '1754-01-01 00:00:00.000'

ELSE m.LastPasswordChange

END,

CASE

WHEN m.LastLockOut IS NULL THEN '1754-01-01 00:00:00.000'

ELSE m.LastLockOut

END,0,'1754-01-01 00:00:00.000',0,'1754-01-01 00:00:00.000',m.Comment,m.Joined

FROM [DeathBlow].[dbo].[yaf_prov_membership] m

Left JOIN [DeathBlow].[dbo].[aspnet_Membership] mm on m.UserID = mm.UserID

Where mm.UserID IS NULL

INSERT [DeathBlow].[dbo].[Users] ([Username],[FirstName],[LastName] ,[IsSuperUser],[Email],[DisplayName] ,[IsDeleted],[CreatedByUserID],[CreatedOnDate],[LastModifiedByUserID],[LastModifiedOnDate],[UpdatePassword])

SELECT u.Name,u.Name,'',0,u.Email,u.DisplayName,0,-1,u.Joined,-1,LastVisit, 1

FROM [DeathBlow].[dbo].[yaf_User] u

JOIN [DeathBlow].[dbo].[yaf_prov_membership] m on m.UserID = u.ProviderUserKey

LEFT JOIN [DeathBlow].[dbo].[Users] uu on m.username = uu.username

WHERE uu.UserID IS NULL

INSERT [DeathBlow].[dbo].[UserPortals] (UserId,PortalId,CreatedDate,Authorised)

SELECT u.Userid,0,u.[CreatedOnDate],1

FROM [DeathBlow].[dbo].[Users] u

LEFT JOIN [DeathBlow].[dbo].[UserPortals] up on u.userid = up.userid

where u.UserID != 1

AND up.userid is null

INSERT [DeathBlow].[dbo].[UserRoles] (UserID,RoleID,IsTrialUsed,CreatedByUserID,CreatedOnDate,LastModifiedByUserID,LastModifiedOnDate)

SELECT u.UserID, 1, 1, -1,u.CreatedOnDate,-1,u.LastModifiedOnDate

FROM [DeathBlow].[dbo].[Users] u

LEFT JOIN [DeathBlow].[dbo].[UserRoles] ur ON u.UserID = ur.UserID

AND ur.ROLEID = 1

WHERE u.UserID != 1

AND ur.UserID IS NULL

INSERT [DeathBlow].[dbo].[UserRoles] (UserID,RoleID,IsTrialUsed,CreatedByUserID,CreatedOnDate,LastModifiedByUserID,LastModifiedOnDate)

SELECT u.UserID, 2, 1, -1,u.CreatedOnDate,-1,u.LastModifiedOnDate

FROM [DeathBlow].[dbo].[Users] u

LEFT JOIN [DeathBlow].[dbo].[UserRoles] ur ON u.UserID = ur.UserID

AND ur.ROLEID = 2

WHERE u.UserID != 1

AND ur.UserID IS NULL

Commit

Using DNN 05.06.01 and YAF_DNN5_1.95.5-4750

Thanks for help.

Suggestion : Once done, maybe it could be great to add the feature inside Yaf DNN Module (possibility to import users and forum content).

3KyNoX
  • 3KyNoX
  • 53% (Neutral)
  • YAF Forumling
11 years ago
Resolved first error by creating in dnn a new user. and relog to HostAdmin account.

The error...

Quote:

Error

A system error happened. Thanks to contact administrator.

Continue Link...

... disappeared and forum is displayed correctly now, but I cannot no longer use previous accounts because of password that i can't change from 'reset password' button or admin panel... And while logged as HostAdmin, i don't see the admin Yaf Links. So i can't go to Yaf Admin Pages..

ruek23
  • ruek23
  • 90.2% (Exalted)
  • YAF Lover
11 years ago
Originally Posted by: 3KyNoX 

Resolved first error by creating in dnn a new user. and relog to HostAdmin account.

The error...

Quote:

Error

A system error happened. Thanks to contact administrator.

Continue Link...

... disappeared and forum is displayed correctly now, but I cannot no longer use previous accounts because of password that i can't change from 'reset password' button or admin panel... And while logged as HostAdmin, i don't see the admin Yaf Links. So i can't go to Yaf Admin Pages..

All original users will have to get a new password... this worked fine for 75% of my users after the migration. the issue is the other 25% who couldn't have their password reset. I had to do these manually from the admin account in DNN. to get Host Access back in YAF reset the password of the original host user and login with that person

3KyNoX
  • 3KyNoX
  • 53% (Neutral)
  • YAF Forumling
11 years ago
Thanks, i got access to original yaf forum admin back and added HostAdmin & SiteAdmin to the forum administrator group.

But for other members, the problem is :

If they use forgot password link, they got the following error :

Quote:

There was an error retrieving your password. No password was sent.

And if i try to do a password reset for that account in admin panel, the password is reset, temporary password is correctly sent to account email, this user using this password to login and changing the password, but at this point, new error...

Quote:

There was an error setting the password. The password has not been changed.

Tryed again and again with an old test account i was having, it changed the password to the one I set but impossible to logging in with it.

Thanks for help.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
11 years ago
You can try my way of solving the password issue manually:

- Open the Table "aspnet_Membership" in your Database

- Select a User with a password that works for example the admin

- Copy the Password and PasswordSalt Value to any user you want

And you should been able to login.

3KyNoX
  • 3KyNoX
  • 53% (Neutral)
  • YAF Forumling
11 years ago
Simple one. :)

Is it how the password have been imported ,who don't permit to change it while I am in administration panel or trying to retrieve it at login ?

So, I'll try this first, Thanks.

3KyNoX
  • 3KyNoX
  • 53% (Neutral)
  • YAF Forumling
11 years ago
Users password redefined, thanks a lot, worked like a charm. 🙂
aliirz
  • aliirz
  • 55.4% (Neutral)
  • YAF Forumling
10 years ago
Has somebody been able to do it successfully? I am also trying to do the same thing, I am a bit concerned about losing the data I already have in the YAF DB or to run into problem that makes the forum unusable like the above user. Please help?
brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander
10 years ago
Can I ask :

- will the existing URL's be the same.

- was there a solution to keep the same passwords

Thank you


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
10 years ago
Originally Posted by: brigzy 

Can I ask :

- will the existing URL's be the same.

- was there a solution to keep the same passwords

Thank you

The urls will be different, you would have to migrate the existing urls if possible.

If you use the same machine key and the same membership settings the passwords should work.

brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander
10 years ago
Originally Posted by: tha_watcha 

Originally Posted by: brigzy 

Can I ask :

- will the existing URL's be the same.

- was there a solution to keep the same passwords

Thank you

The urls will be different, you would have to migrate the existing urls if possible.

If you use the same machin key and the same membership settings the passwords should work.

Hi there,

can I ask how I might be able to migrate the URL's.

Perhaps I could keep the existing forum default page and redirect each URL to correct URL the new forum maybe.

So I am thinking of creating the new DNN forum in a new forum folder 'Forums' (with an s), then change the old forum\default.aspx to redirect each url appropriately.

Have a good weekend:)


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
10 years ago
It depends where you need to modify the urls.

If you want to migrate the urls inside topics that link to other topics inside the forum. You could do that by hand, if you don't have many topics. Or use an sql replace script to modify all urls in messages.

Quote:

then change the old forum\default.aspx to redirect each url appropriately.

Yes thats also the proper solution to handle all other urls that may come from external links, if thats necessary .

brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander
10 years ago
Is it possible to extract a list of user login and passwords?

Then I can re-create the accounts in DNN manually.

Thanks for your help


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander
10 years ago
Originally Posted by: brigzy 

Is it possible to extract a list of user login and passwords?

Then I can re-create the accounts in DNN manually.

Thanks for your help

I have created a new forum database in DNN, and added the previous posts manualy (only about 30 or so).

This is good for me as I wanted to reorganise things.

I was planning on adding the forum members manually too (about 50).

But in order to do that I would like to set the passwords to be the same as the old forum.

Any clues?

Richard


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander
10 years ago
I created new passwords in the end.

I then used DNN to send a newsletter informing about the site and asking users to use the retrieve password option.

Its quite good that I couldn't unravel the passwords - a good security feature.

:)


UserPostedImage New Network Edition V2.8 - Released Dec 2013