Hi,
I couldn't see this mentioned anywhere else, but it seems if there is a moved topic in a forum list, and the bad word list is also being used, then the site will error (silently if in release mode). This is because the first message is being checked for bad words, but it is coming from the moved topic ID (which would return a null) rather than the original topic.
This shows up when viewing the list of topics in a forum that has a moved topic in it.
To fix, I referenced the original topic to get the first message:
in the sproc yaf_topic_list, change
FirstMessage = (SELECT TOP 1 CAST([Message] as nvarchar(1000)) FROM [dbo].[yaf_Message] mes2 where mes2.TopicID = c.TopicID AND mes2.Position = 0)
to
FirstMessage = (SELECT TOP 1 CAST([Message] as nvarchar(1000)) FROM [dbo].[yaf_Message] mes2 where mes2.TopicID = IsNull(c.TopicMovedID,c.TopicID) AND mes2.Position = 0)
Regards,
Reptophile
EDIT: same applies to the sproc yaf_topic_active, will error when searching for active topics if the above conditions are true.
Edited by user
2008-12-15T05:20:15Z
|
Reason: addition