TRSWCM中如何将栏目移动到另外一个站点中
最后更新时间:2016年03月26日 人气:...

一、问题说明:

WCM栏目移动只支持在本站点之内移动,不支持跨站移动;

主要是因为栏目配置的模板、工作流等这些信息属于站点,移动后产生不可预期的问题

二、处理说明:

1、从数据库底层做相对比较高效,具体步骤如下:

  • 停止WCM

  • 备份WCM DB

  • 执行跨站移动栏目脚本

  • 启动WCM

  • 给新的栏目配置新的模板

  • 站点或者新父栏目需要给指定栏目授权

  • 确认移动后是否正常(预览)

2、涉及到的信息:

  • 栏目

  • 文档

  • 文档关键词

  • 相关文档

  • 直接在栏目下创建的模板

  • 栏目配置的首页和细览模板

  • 栏目所属的扩展字段

  • 栏目配置的工作流如果是站点级的需要删除

  • 模板变量相关内容

  • 触发发布相关

3、相关SQL脚本:

--Oracle
--栏目
update WCMChannel set SiteId=<站点ID> where ChannelId in
(select ChannelId from WCMChannel start with ChannelId=<栏目ID> connect by prior ChannelId= parentid);
update WCMChannel set parentid=<父栏目ID> where ChannelId=<栏目ID>;
 --文档
update WCMDocument set SiteId=<站点ID>,srcSiteId=<站点ID> where DocChannel in
(select ChannelId from WCMChannel start with ChannelId=<栏目ID> connect by prior ChannelId= parentid);
update WCMChnlDoc set SiteId=<站点ID>,srcSiteId=<站点ID> where DocChannel in
(select ChannelId from WCMChannel start with ChannelId=<栏目ID> connect by prior ChannelId= parentid);

--模板
update WCMTemplate set RootId=<站点ID> where FolderType=101 and FolderId in
(select ChannelId from WCMChannel start with ChannelId=<栏目ID> connect by prior ChannelId= parentid);

--模板附件

--关键词
update WCMDocKeywords set SiteId=<站点ID> where DocId in (
select DocId from WCMDocument where DocChannel in (select ChannelId from WCMChannel start with ChannelId=<栏目ID> connect by prior ChannelId= parentid)
);
--相关文档
WCMRelation

--工作流(清除工作流设置)  
WCMChnlFlow (提供程序是否更加好一些)
--扩展字段
WCMContentExtField(提供程序是否更加好一些)

说明:

<父栏目ID>:如果移到站点根下,父栏目ID为0

热门评论