YAFLogo

jabrazil
  • jabrazil
  • 50.2% (Neutral)
  • YAF Camper Topic Starter
11 years ago
I have a DNN user with a profile photo but I cannot get it to sync with my YAF forum. Is photo syncing supported by the YAF dnn module?

Thanks

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
11 years ago

I have a DNN user with a profile photo but I cannot get it to sync with my YAF forum. Is photo syncing supported by the YAF dnn module?

Thanks

Originally Posted by: jabrazil 

Yes the DNN User Photo is imported as YAF Avatar. The YAF Profile is updated when the DNN Profile is updated, and the user visits the yaf page. Or when you run the user importer.

billyba
  • billyba
  • 51.4% (Neutral)
  • YAF Camper
11 years ago
I too am experiencing a user photo problem, that looks like it is more than just the photo. I upgraded to the latest version of YAF the other day and it seems to have messed up the profile syncing with DNN. In fact, the button "Sync All Users" is now gone. When viewing the event log, I see the following errors:

Error while Syncing dnn userprofile with Yaf System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'dbo.YafDnn_LastUpdatedProfile'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at DotNetNuke.Data.PetaPoco.PetaPocoExt.ExecuteReader(Database database, String sql, Object[] args) at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteReader(String connectionString, CommandType type, String sql, Object[] args) at DotNetNuke.Data.SqlDataProvider.ExecuteReader(String procedureName, Object[] commandParameters) at YAF.DotNetNuke.Components.Controllers.Profile.YafDnnGetLastUpdatedProfile(Int32 userID) at YAF.DotNetNuke.Components.Utils.ProfileSyncronizer.UpdateUserProfile(Int32 yafUserId, YafUserProfile yafUserProfile, IUserData yafCurrentUserData, UserInfo dnnUserInfo, MembershipUser membershipUser, Int32 portalID, Guid portalGuid, Int32 boardId) ClientConnectionId:40996ca7-075e-48b8-a2cb-8633f59555d7

Any idea what's causing this?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
11 years ago

Any idea what's causing this?

Looks, like not all upgrade scripts are executed during upgrade.

Try to manually run the scrips from DNN Host -> SQL ->

and run the following script

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'{databaseOwner}{objectQualifier}YafDnn_LastUpdatedProfile') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE {databaseOwner}{objectQualifier}YafDnn_LastUpdatedProfile
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}YafDnn_LastUpdatedProfile
  @UserID int
	AS
	SELECT TOP 1
		LastUpdatedDate
	FROM {databaseOwner}{objectQualifier}UserProfile
	WHERE UserID=@UserID
	order by LastUpdatedDate DESC
GO

(Do not forget to check the checkbox "Run As Script")

billyba
  • billyba
  • 51.4% (Neutral)
  • YAF Camper
11 years ago
The avatars are now showing up! Thanks!
fpl619
  • fpl619
  • 51.2% (Neutral)
  • YAF Forumling
11 years ago
I had to run this script also on a fresh install of DNN 7.2 and a fresh install of YAF 2.1.

Before running it, it would not display the display name from DNN - just the username, which was the email since I have that option set in DNN (use email for username).

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
11 years ago

I had to run this script also on a fresh install of DNN 7.2 and a fresh install of YAF 2.1.

Before running it, it would not display the display name from DNN - just the username, which was the email since I have that option set in DNN (use email for username).

Originally Posted by: fpl619 

Thanks, script was not updated. Fixed Build is online.

Rawbert
  • Rawbert
  • 94.2% (Exalted)
  • YAF Commander
11 years ago
Ran the script but still no avatar for some users.. picture does show up under dnn profile, but not on yaf; what else can I try? I'm on 2.0.0, but can't upgrade to the latest yaf because the Cook dll breaks my site.. also the user accounts don't seem to sync and I can't find where to trigger the user import manually.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
11 years ago

Ran the script but still no avatar for some users.. picture does show up under dnn profile, but not on yaf; what else can I try? I'm on 2.0.0, but can't upgrade to the latest yaf because the Cook dll breaks my site.. also the user accounts don't seem to sync and I can't find where to trigger the user import manually.

Originally Posted by: Rawbert 

When you logged in as dnn host you have access to the "DNN User Importer" in dnn, access able from the Module Action Menu (in dnn edit page mode), as seen in the screenshot

On the Page the "Import Now" Button synchronizes all users including the profiles.

Rawbert
  • Rawbert
  • 94.2% (Exalted)
  • YAF Commander
11 years ago
Thanks watcha, pictures still don't show up after the manual import.. :(

Also the number of users don't match up, I have 56 in DNN and 60 in YAF.. what's up with that? When I delete a user, should I do it from within yaf or dnn? Or both?

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
11 years ago

Thanks watcha, pictures still don't show up after the manual import.. :(

Also the number of users don't match up, I have 56 in DNN and 60 in YAF.. what's up with that? When I delete a user, should I do it from within yaf or dnn? Or both?

Originally Posted by: Rawbert 

At the moment the profiles are only synced if the dnn user profile is newer. I change that with the next update.

Rawbert
  • Rawbert
  • 94.2% (Exalted)
  • YAF Commander
11 years ago
5504 fixed my profile pic issues!
Rawbert
  • Rawbert
  • 94.2% (Exalted)
  • YAF Commander
11 years ago
Added a new board with a new domain and the DNN profile pics won't sync.. they sync fine on my old board though.. I'm on DNN 7.2.1 and YAF 2.1.0
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
11 years ago
As i wrote above the profile is only synced if the dnn profile is newer then the yaf profile, thats why nothing gets synced in your case. In YAF.NET when you use Import Now function, it now syncs all profiles. This hopefully should fix the issue.
Rawbert
  • Rawbert
  • 94.2% (Exalted)
  • YAF Commander
11 years ago

As i wrote above the profile is only synced if the dnn profile is newer then the yaf profile, thats why nothing gets synced in your case. In YAF.NET when you use Import Now function, it now syncs all profiles. This hopefully should fix the issue.

Originally Posted by: tha_watcha 

But this is a brand new site/board/domain, with brand new DNN profiles watcha!!! It should have nothing to do with my other, old site/board/users, no?

I don't get it.. but something isn't right here.. seems like YAF is confusing sites/domains/boards/users.. I'll make a new post as I have more user account errors after I upgraded to 2.1.1.