YAFLogo

Demigod
  • Demigod
  • 95.60001% (Exalted)
  • YAF Commander Topic Starter
2009-05-05T09:46:51Z
Right after I put the config password in I got this message:

Server Error in '/' Application.

FILE:

mssql/constraints.sql

ERROR:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_yaf_UserPMessage_yaf_PMessage". The conflict occurred in database "wlc", table "dbo.yaf_PMessage", column 'PMessageID'.

STATEMENT:

if not exists(select 1 from dbo.sysobjects where name='FK_yaf_UserPMessage_yaf_PMessage' and parent_obj=object_id('[dbo].[yaf_UserPMessage]') and OBJECTPROPERTY(id,N'IsForeignKey')=1)

alter table [dbo].[yaf_UserPMessage] add constraint [FK_yaf_UserPMessage_yaf_PMessage] foreign key (PMessageID) references [dbo].[yaf_PMessage] (PMessageID)

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:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_yaf_UserPMessage_yaf_PMessage". The conflict occurred in database "wlc", table "dbo.yaf_PMessage", column 'PMessageID'.

STATEMENT:

if not exists(select 1 from dbo.sysobjects where name='FK_yaf_UserPMessage_yaf_PMessage' and parent_obj=object_id('[dbo].[yaf_UserPMessage]') and OBJECTPROPERTY(id,N'IsForeignKey')=1)

alter table [dbo].[yaf_UserPMessage] add constraint [FK_yaf_UserPMessage_yaf_PMessage] foreign key (PMessageID) references [dbo].[yaf_PMessage] (PMessageID)

Source Error:

Line 537:

Line 538:

Line 539: DB.system_initialize_executescripts(script,scriptFile, useTransactions);

Line 540:

Line 541: }

Any ideas what could be the problem?

Sponsor
Demigod
  • Demigod
  • 95.60001% (Exalted)
  • YAF Commander Topic Starter
2009-05-06T05:19:12Z
Any ideas would be appreciated...
Demigod
  • Demigod
  • 95.60001% (Exalted)
  • YAF Commander Topic Starter
2009-05-06T15:07:36Z
I'm at a complete standstill till someone throws me a bone...
Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
2009-05-07T09:56:08Z
Well I'm looking bud; but constraints really aren't my bag ;-)

You're 100% sure you've used the completely new SQL folders and there is no cross contamination with older versions here?


UserPostedImage 

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
2009-05-07T10:06:21Z
I believe you have some orphaned records in this table; hence you can't apply the FK.

Run this against your database to see if you have any orphaned records in this table:


select * from dbo.yaf_userPMessage pm
where (not exists (select 1 from yaf_PMessage m where m.PMessageID=pm.PMEssageID))

If it returns some records; then those are your problem. If it doesn't; then back to the drawing board.


UserPostedImage 

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

mr3xcellent
2009-05-14T09:15:12Z
I think I'm having a similar issue:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_yaf_EventLog_yaf_User". The conflict occurred in database "db_cef_yaf_forums", table "dbo.yaf_User", column 'UserID'.

Would there be a similar query to identify what rows are the issue?

mr3xcellent
2009-05-14T09:52:36Z
I deleted all rows from "dbo.yaf_EventLog" and that resolved my previous issue.

Then it threw up an error when creating a view for "yaf_vaccess", so I deleted "dbo.yaf_vaccess", and then it seemed to complete the install. Now I get the following error when trying to load the forums:

The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

I've added to the topic about this here .

mr3xcellent
2009-05-18T05:29:34Z
I realized my issue with "The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it."

I was using the YAF-v1.9.3-FINAL-BIN-NET35.zip (because I initially though I would want to run this in .NET 3.5), but I was upgrading from 1.9.1.8, so I decided not to, but didn't download the NET20 version.

Once I tried all of this again with the YAF-v1.9.3-FINAL-BIN-NET20.zip, I was able to get the Forums running. I still needed to delete all the rows from dbo.yaf_EventLog and delete the table dbo.yaf_vaccess, but otherwise it worked.

I have two more issues now, even though things are running.

1) My Event Log is getting "Validation of viewstate MAC failed." error msgs... Server is on a cloud, would that matter?

2) There is no "Register" link on my board. (I do allow Guests to Read, Post, and download attachments... but that shouldn't affect whether or not the Register link shows up though, right?)

If anyone can point me in the right direction to help tackle these issues, I would really appreciate it.

Thanks,

-mr3xcellent

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
2009-05-18T07:41:52Z
1) AFAIK yes it does, you need to do a shared machine key in your web.config I believe (there's a topic somewhere).

2) Yeah thats right; have you turned off Registrations in your host settings (note you have to be logged in as the original host admin).

oh and 3) starting new threads is a good idea with different probelms ;-)


UserPostedImage 

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

visendo
  • visendo
  • 54.2% (Neutral)
  • YAF Forumling
2009-07-27T12:19:02Z
hi,

i have also an problem by upgrade from 1.9.1.8 to 1.9.3

FILE:

mssql/constraints.sql

ERROR:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_yaf_Forum_yaf_Message". The conflict occurred in database "visendo_forum_online", table "dbo.yaf_Message", column 'MessageID'.

STATEMENT:

if not exists(select 1 from dbo.sysobjects where name='FK_yaf_Forum_yaf_Message' and parent_obj=object_id('[dbo].[yaf_Forum]') and OBJECTPROPERTY(id,N'IsForeignKey')=1)

alter table [dbo].[yaf_Forum] add constraint [FK_yaf_Forum_yaf_Message] foreign key (LastMessageID) references [dbo].[yaf_Message] (MessageID)

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:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_yaf_Forum_yaf_Message". The conflict occurred in database "visendo_forum_online", table "dbo.yaf_Message", column 'MessageID'.

STATEMENT:

if not exists(select 1 from dbo.sysobjects where name='FK_yaf_Forum_yaf_Message' and parent_obj=object_id('[dbo].[yaf_Forum]') and OBJECTPROPERTY(id,N'IsForeignKey')=1)

alter table [dbo].[yaf_Forum] add constraint [FK_yaf_Forum_yaf_Message] foreign key (LastMessageID) references [dbo].[yaf_Message] (MessageID)

Any ideas & help would be appreciated...

thank you

cosmin