Skip to content

Error Upgrading to Version 07.00.07

Will Strohl edited this page Jun 4, 2023 · 4 revisions

As always, you should be backing up your website before installing any new extensions, just in case something happens.

In the case of version 07.00.07, you may run into such an issue. The error below is the specific error being referred to.

Failure SQL Execution resulted in following Exceptions:  
System.Data.SqlClient.SqlException (0x80131904):  
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_activeforums_URL_Topics".  
The conflict occurred in database "MyDatabaseTable", table "dbo.activeforums_Topics", column 'TopicId'.

If you get the above fatal error related to a database query, you may have orphaned URL records in your database. To confirm this, first run the query below.

SELECT u.* FROM activeforums_URL u  
LEFT OUTER JOIN activeforums_Topics t  
ON t.TopicId = u.TopicId  
WHERE t.TopicId IS NULL  

If the above query returns any results, you'll need to run the next query to remove them. This is because you've had topics created in the past that had custom a URL associated to it, but the topic has since been deleted. (This is fixed in recent versions.)

DELETE u FROM activeforums_URL u  
LEFT OUTER JOIN activeforums_Topics t  
ON t.TopicId = u.TopicId  
WHERE t.TopicId IS NULL