YAFLogo

abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
10 years ago
Dear All,

I just upgrade my yaf forum to version 1.9.6.1 (Date: 18-03-2012).

I meet the issue in email verify, it shows all Chinese character and have no link to active for new member.

please help me to fix this issue.

Thank a lot.

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Dear All,

I just upgrade my yaf forum to version 1.9.6.1 (Date: 18-03-2012).

I meet the issue in email verify, it shows all Chinese character and have no link to active for new member.

please help me to fix this issue.

Thank a lot.

Originally Posted by: abcd 

Why did you upgrade to an old release and not the latest version (issue is still present in YAF 2.0)? The issue will be fixed in 2.1.

https://github.com/YAFNET/YAFNET/commit/503b5dab388b76488b692d98afdf937e6b2fa9bc  here.

http://forum.yetanotherforum.net/yaf_postsm61961_Help--Users-not-able-to-register-due-to-email-verification--problem.aspx#post61961 

abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
10 years ago

Dear All,

I just upgrade my yaf forum to version 1.9.6.1 (Date: 18-03-2012).

I meet the issue in email verify, it shows all Chinese character and have no link to active for new member.

please help me to fix this issue.

Thank a lot.

Originally Posted by: tha_watcha 

Why did you upgrade to an old release and not the latest version (issue is still present in YAF 2.0)? The issue will be fixed in 2.1.

https://github.com/YAFNET/YAFNET/commit/503b5dab388b76488b692d98afdf937e6b2fa9bc  here.

http://forum.yetanotherforum.net/yaf_postsm61961_Help--Users-not-able-to-register-due-to-email-verification--problem.aspx#post61961 

Originally Posted by: abcd 

Dear Tha_watcha,

I upgrade to 2.1 Final, and the error time out happen:

Server Error in '/' Application.

The wait operation timed out

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: The wait operation timed out

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Win32Exception (0x80004005): The wait operation timed out]

[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6676046

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +810

System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) +761

System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() +249

System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() +48

System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() +64

System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) +114

System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +951

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +84

System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest) +1370

System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest) +674

System.Data.SqlClient.SqlInternalTransaction.Rollback() +1608008

System.Data.SqlClient.SqlTransaction.Rollback() +412

YAF.Classes.Data.LegacyDb.system_initialize_executescripts(String script, String scriptFile, Boolean useTransactions) +1437

YAF.Core.Services.InstallUpgradeService.ExecuteScript(String scriptFile, Boolean useTransactions) +188

YAF.Core.Services.InstallUpgradeService.UpgradeDatabase(Boolean fullText, Boolean upgradeExtensions) +205

YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1559

System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +584

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +84

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

althought I have increase time out in app.cfg

and

in web.cfg

please help me on this.

Thanks very much

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago
There is a procedure which can take very long, if you didn't have display names enabled then there is a [post=62119]workaround for you here[/post].
abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
10 years ago
Dear Tha_watcha,

I remove these lines from tables.sql in install folder:

if exists (select top 1 1 from [{databaseOwner}].[{objectQualifier}Message] where UserDisplayName IS NULL)

exec('[{databaseOwner}].[{objectQualifier}forum_initdisplayname]')

GO

but another error happen:

Server Error in '/' Application.

FILE:

mssql/constraints.sql

ERROR:

Cannot create more than one clustered index on table 'dbo.yaf_UserProfile'. Drop the existing clustered index '_dta_index_yaf_UserProfile_c_7_492426714__K1' before creating another.

Could not create constraint. See previous errors.

STATEMENT:

if not exists (select top 1 1 from sys.indexes where object_id=object_id('[dbo].[yaf_UserProfile]') and name='PK_yaf_UserProfile')

alter table [dbo].[yaf_UserProfile] with nocheck add constraint [PK_yaf_UserProfile] primary key clustered(UserID,ApplicationName)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: FILE:

mssql/constraints.sql

ERROR:

Cannot create more than one clustered index on table 'dbo.yaf_UserProfile'. Drop the existing clustered index '_dta_index_yaf_UserProfile_c_7_492426714__K1' before creating another.

Could not create constraint. See previous errors.

STATEMENT:

if not exists (select top 1 1 from sys.indexes where object_id=object_id('[dbo].[yaf_UserProfile]') and name='PK_yaf_UserProfile')

alter table [dbo].[yaf_UserProfile] with nocheck add constraint [PK_yaf_UserProfile] primary key clustered(UserID,ApplicationName)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: FILE:

mssql/constraints.sql

ERROR:

Cannot create more than one clustered index on table 'dbo.yaf_UserProfile'. Drop the existing clustered index '_dta_index_yaf_UserProfile_c_7_492426714__K1' before creating another.

Could not create constraint. See previous errors.

STATEMENT:

if not exists (select top 1 1 from sys.indexes where object_id=object_id('[dbo].[yaf_UserProfile]') and name='PK_yaf_UserProfile')

alter table [dbo].[yaf_UserProfile] with nocheck add constraint [PK_yaf_UserProfile] primary key clustered(UserID,ApplicationName)]

YAF.Classes.Data.LegacyDb.system_initialize_executescripts(String script, String scriptFile, Boolean useTransactions) +1540

YAF.Core.Services.InstallUpgradeService.ExecuteScript(String scriptFile, Boolean useTransactions) +188

YAF.Core.Services.InstallUpgradeService.UpgradeDatabase(Boolean fullText, Boolean upgradeExtensions) +205

YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1559

System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +584

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +84

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

thanks for your help

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
10 years ago

Drop the existing clustered index '_dta_index_yaf_UserProfile_c_7_492426714__K1' before creating another.

DROP INDEX _dta_index_yaf_UserProfile_c_7_492426714__K1

It can't be done from installation scripts automatically because in each case index name can vary.

(and there is a special drop index maintanance sp somewhere in tables.sql, I'm not sure that it works in all cases)

Your case is very rare because you have caught a version in development bug.

As to initdisplayname this is a code you can try to replace it in tables.sql. It should work even for a forum like yours.

I don't have time to wipe out possible bugs, because I don't use MS SQL Server, but still I can help anyone who will try it to wipe them.


create procedure [{databaseOwner}].[{objectQualifier}forum_initdisplayname] as

begin
	declare @tmpUserName nvarchar(255)
	declare @tmpUserDisplayName nvarchar(255)
	declare @tmpLastUserName nvarchar(255)
	declare @tmpLastUserDisplayName nvarchar(255)
	declare @tmp int
	declare @tmpUserID int
	declare @tmpLastUserID int

	 update d
      set    d.UserDisplayName = ISNULL((select top 1 f.UserDisplayName FROM [{databaseOwner}].[{objectQualifier}Forum] f
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = f.UserID where u.UserID = d.UserID), 
           (select top 1 f.UserName FROM [{databaseOwner}].[{objectQualifier}Forum] f
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = f.UserID where u.UserID = d.UserID ))	    
       from  [{databaseOwner}].[{objectQualifier}Forum] d where d.UserDisplayName IS NULL OR d.UserDisplayName = d.UserName;
		
		/* declare fc cursor for
		select ForumID, LastUserID from [{databaseOwner}].[{objectQualifier}Forum]
		where (LastUserDisplayName IS NULL OR LastUserName IS NULL) and LastUserID IS NOT NULL
		FOR UPDATE		
		open fc
		
		fetch next from fc into @tmp,@tmpLastUserID
		while @@FETCH_STATUS = 0
		begin
		select @tmpLastUserDisplayName = u.DisplayName,  @tmpLastUserName = u.Name FROM [{databaseOwner}].[{objectQualifier}User] u WHERE u.UserID = @tmpLastUserID
		update [{databaseOwner}].[{objectQualifier}Forum] set LastUserDisplayName = @tmpLastUserDisplayName, LastUserName = @tmpLastUserName where [{databaseOwner}].[{objectQualifier}Forum].ForumID = @tmp 	
		fetch next from fc into @tmp,@tmpLastUserID
		end
		close fc
		deallocate fc */

		update d
       set    d.UserDisplayName = ISNULL((select top 1 f.UserDisplayName FROM [{databaseOwner}].[{objectQualifier}ShoutboxMessage] f
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = f.UserID where u.UserID = d.UserID), 
           (select top 1 f.UserName FROM [{databaseOwner}].[{objectQualifier}ShoutboxMessage] f
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = f.UserID where u.UserID = d.UserID ))	    
       from  [{databaseOwner}].[{objectQualifier}ShoutboxMessage] d where d.UserDisplayName IS NULL OR d.UserDisplayName = d.UserName;
		
	/*	declare sbc cursor for
		select ShoutBoxMessageID,UserID from [{databaseOwner}].[{objectQualifier}ShoutboxMessage]
		where UserDisplayName IS NULL
		FOR UPDATE		
		open sbc
		
		fetch next from sbc into @tmp,@tmpUserID
		while @@FETCH_STATUS = 0
		begin
		select @tmpUserDisplayName = u.DisplayName,  @tmpUserName = u.Name FROM [{databaseOwner}].[{objectQualifier}User] u WHERE u.UserID = @tmpUserID
		update [{databaseOwner}].[{objectQualifier}ShoutboxMessage] set UserDisplayName = @tmpUserDisplayName,UserName = @tmpUserName where [{databaseOwner}].[{objectQualifier}ShoutboxMessage].ShoutBoxMessageID = @tmp
		fetch next from sbc into @tmp,@tmpUserID
		end
		close sbc
		deallocate sbc	
		*/	
		
			update d
       set    d.UserDisplayName = ISNULL((select top 1 f.UserDisplayName FROM [{databaseOwner}].[{objectQualifier}Message] m
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = m.UserID where u.UserID = d.UserID), 
           (select top 1 f.UserName FROM [{databaseOwner}].[{objectQualifier}Message] m
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = m.UserID where u.UserID = d.UserID ))	    
       from  [{databaseOwner}].[{objectQualifier}Message] d where d.UserDisplayName IS NULL OR d.UserDisplayName = d.UserName;	
		
	/*	declare mc cursor for
		select MessageID,UserID from [{databaseOwner}].[{objectQualifier}Message]
		where UserDisplayName IS NULL
		FOR UPDATE
				
		open mc
		
		fetch next from mc into @tmp,@tmpUserID
		while @@FETCH_STATUS = 0
		begin
		select @tmpUserDisplayName = u.DisplayName,  @tmpUserName = u.Name FROM [{databaseOwner}].[{objectQualifier}User] u WHERE u.UserID = @tmpUserID		
		update [{databaseOwner}].[{objectQualifier}Message]  set UserDisplayName = @tmpUserDisplayName, UserName = @tmpUserName where MessageID = @tmp
		fetch next from mc into @tmp,@tmpUserID
		end
		close mc
		deallocate mc
		*/		
		
			update d
       set    d.UserDisplayName = ISNULL((select top 1 f.UserDisplayName FROM [{databaseOwner}].[{objectQualifier}Topic] t
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = t.UserID where u.UserID = d.UserID), 
           (select top 1 f.UserName FROM [{databaseOwner}].[{objectQualifier}Topic] t
          join [{databaseOwner}].[{objectQualifier}User] u on u.UserID = t.UserID where u.UserID = d.UserID ))	    
       from  [{databaseOwner}].[{objectQualifier}Message] d where d.UserDisplayName IS NULL OR d.UserDisplayName = d.UserName;	

	/*	declare tc cursor for
		select TopicID,UserID,LastUserID from [{databaseOwner}].[{objectQualifier}Topic]
		where (UserDisplayName IS NULL OR LastUserDisplayName IS NULL) and LastUserID IS NOT NULL 
		FOR UPDATE
				
		open tc
		
		fetch next from tc into @tmp,@tmpUserID,@tmpLastUserID
		while @@FETCH_STATUS = 0
		begin	
		select @tmpUserDisplayName = u.DisplayName,  @tmpUserName = u.Name FROM [{databaseOwner}].[{objectQualifier}User] u WHERE u.UserID = @tmpUserID	
		select @tmpLastUserDisplayName = u.DisplayName,  @tmpLastUserName = u.Name FROM [{databaseOwner}].[{objectQualifier}User] u WHERE u.UserID = @tmpLastUserID		
		update [{databaseOwner}].[{objectQualifier}Topic] set UserDisplayName = @tmpUserDisplayName, UserName = @tmpUserName  where TopicID = @tmp
		update [{databaseOwner}].[{objectQualifier}Topic] set LastUserDisplayName = @tmpLastUserDisplayName, LastUserName = @tmpLastUserName where TopicID = @tmp			

		fetch next from tc into @tmp,@tmpUserID,@tmpLastUserID
		end
		close tc
		deallocate tc	*/		
end
GO
abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
10 years ago
Thanks bbobb and All

I may be waited for new version to fix this issue

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago

Thanks bbobb and All

I may be waited for new version to fix this issue

Originally Posted by: abcd 

You need to manually drop the index. Do you have access to the sql server management studio on your server? if yes you can directly remove it from the userprofile table. If not Go in YAF to Admin -> Database -> Run SQL Query ->

if exists (select top 1 1 from  sys.indexes where object_id=object_id('[{databaseOwner}].[{objectQualifier}UserProfile]') and name='_dta_index_yaf_UserProfile_c_7_492426714__K1')
ALTER TABLE [{databaseOwner}].[{objectQualifier}UserProfile] DROP CONSTRAINT _dta_index_yaf_UserProfile_c_7_492426714__K1
abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
10 years ago

Thanks bbobb and All

I may be waited for new version to fix this issue

Originally Posted by: tha_watcha 

You need to manually drop the index. Do you have access to the sql server management studio on your server? if yes you can directly remove it from the userprofile table. If not Go in YAF to Admin -> Database -> Run SQL Query ->

if exists (select top 1 1 from  sys.indexes where object_id=object_id('[{databaseOwner}].[{objectQualifier}UserProfile]') and name='_dta_index_yaf_UserProfile_c_7_492426714__K1')
ALTER TABLE [{databaseOwner}].[{objectQualifier}UserProfile] DROP CONSTRAINT _dta_index_yaf_UserProfile_c_7_492426714__K1

Originally Posted by: abcd 

I deleted _dta_index_yaf_UserProfile_c_7_492426714__K1, and now I can upgrade to YAF.NET v2.1.2 (Dated: 06/02/2014).

Now I am testing for new upgrade, I will let you know when it's done.

Thanks so much.