接到用户反馈 Discuz!NT 2.5 beta 下载安装升级后,Tag功能无法正常使用。我们排查了原因,现在提供解决方法:
下载下面的文件,解压缩其中的 urls.config 文件,上传覆盖空间上 config 目录中的同名文件。 若不生效,请重启一下 iis 的应用程序池。
附件: urls.zip (2008-6-30 10:51:47, 715 B)
该附件被下载次数 400
另外根据8ee朋友的反馈,升级程序未能将 dnt_tags 表中 tagid 字段设置为标识列 ,所以大家可以在 SQL Server 查询分析器中运行一下代码。当然通过SQL Server企业管理器操作也可 /* 为了防止任何可能出现的数据丢失问题,您应该先仔细检查此脚本,然后再在数据库设计器的上下文之外运行此脚本。*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_userid
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_orderid
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_count
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_fcount
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_pcount
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_scount
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_vcount
GO
ALTER TABLE dbo.dnt_tags
DROP CONSTRAINT DF_dnt_tags_gcount
GO
CREATE TABLE dbo.Tmp_dnt_tags
(
tagid int NOT NULL IDENTITY (1, 1),
tagname nchar(10) NOT NULL,
userid int NOT NULL,
postdatetime datetime NOT NULL,
orderid int NOT NULL,
color char(6) NOT NULL,
count int NOT NULL,
fcount int NOT NULL,
pcount int NOT NULL,
scount int NOT NULL,
vcount int NOT NULL,
gcount int NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_userid DEFAULT ((0)) FOR userid
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_orderid DEFAULT ((0)) FOR orderid
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_count DEFAULT ((0)) FOR count
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_fcount DEFAULT ((0)) FOR fcount
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_pcount DEFAULT ((0)) FOR pcount
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_scount DEFAULT ((0)) FOR scount
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_vcount DEFAULT ((0)) FOR vcount
GO
ALTER TABLE dbo.Tmp_dnt_tags ADD CONSTRAINT
DF_dnt_tags_gcount DEFAULT ((0)) FOR gcount
GO
SET IDENTITY_INSERT dbo.Tmp_dnt_tags ON
GO
IF EXISTS(SELECT * FROM dbo.dnt_tags)
EXEC('INSERT INTO dbo.Tmp_dnt_tags (tagid, tagname, userid, postdatetime, orderid, color, count, fcount, pcount, scount, vcount, gcount)
SELECT tagid, tagname, userid, postdatetime, orderid, color, count, fcount, pcount, scount, vcount, gcount FROM dbo.dnt_tags WITH (HOLDLOCK TABLOCKX)')
GO
SET IDENTITY_INSERT dbo.Tmp_dnt_tags OFF
GO
DROP TABLE dbo.dnt_tags
GO
EXECUTE sp_rename N'dbo.Tmp_dnt_tags', N'dnt_tags', 'OBJECT'
GO
ALTER TABLE dbo.dnt_tags ADD CONSTRAINT
PK_dnt_tags PRIMARY KEY CLUSTERED
(
tagid
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
COMMIT
给大家带来了不便,在此致歉。
特别感谢 :
石油人 协助测试。