DNN 5.x to 6.x upgrading issues

解决DNN模块升级问题
本文提供了一种解决DNN从5.x版本升级到6.x版本后,新安装的模块未出现在模块下拉列表中的问题的方法。通过执行特定的SQL语句,可以确保新模块在所有门户中正确显示。

Supported by Nova Outsourcing

 

I suffered the issue when upgrading a old DNN site from 5.x to 6.x that the new installed module doesn’t appear in the modules dropdown list and Assigned Premium Modules/Assigned list

image

To address the issue I took a discovery in DNN db schema and worked out the following sql.

declare @targetDesktopModuleId bigint
set @targetDesktopModuleId = [the desktopModuleId of your new installed module]
declare cur_portalId cursor for
select p1.portalId from portals p1
where not exists(
select portalId from PortalDesktopModules p2
where DesktopModuleID = @targetDesktopModuleId
and p1.PortalID = p2.PortalID)
declare @portalId bigint
open cur_portalId
fetch next from cur_portalId into @portalId
while @@FETCH_STATUS = 0
begin
INSERT INTO PortalDesktopModules
(portalid, DesktopModuleID, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate)
values(@portalId,@targetDesktopModuleId,-1,GETDATE(),-1,GETDATE())
fetch next from cur_portalId into @portalId
end
close cur_portalId
deallocate cur_portalid
GO

 

The @targetDesktopModuleId is the desktopModuleId for your new installed module which can be get in the following sql.

select DesktopModuleID from DesktopModules
where FriendlyName = '[the friendly name of your module]'

 

The new installed module will appear in the aforementioned two list after run the sql above. If not, please restart your site or simply do a meaningless change in web.config to enforce the caches of the site to be reloaded.

 

Supported by Nova Outsourcing

转载于:https://www.cnblogs.com/czy/archive/2012/09/05/2671539.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值