Tridion 2011 SP1:安装了Translation Manager和Powertools 2011的Trid
Tridion 2011 SP1 : Tridion GUI Javascript error with Translation Manager and Powertools 2011 installed
我最近安装了Tridion 2011 SP1,并启用了SDL模块Translation Manager。
一切都很好。然后我按照安装程序安装了Tridion 2011 Powertools。
当尝试重新加载GUI时(浏览器缓存被清空,WebRoot''Configuration''System.Config中服务器元素的修改参数被设置),我得到了以下Javascript错误:
SCRIPT5007:无法获取属性"getItemType"的值:对象为null或未定义
Dashboard_v6.1.0.55920.18_.aspx?mode=js,第528行字符851
这里是相关的JS行:
Tridion.TranslationManager.Commands.Save.protype.isAvailable=函数(c,a){var
e=c.getItem(0),f=$models.getItem(e),b=f.getItemType(),d=$models.getItem(this.getTmUri())
前面的Javascript行处理其他TranslationManager命令,所以我认为这是一种TranslationManager的命令注册或其他处理。
尝试通过选择任何文件夹/结构浏览我的Tridion出版物也会出现同样的错误,右侧框架(内容框架)不会显示任何Tridion项目,而只是显示:
正在加载。。。
有人经历过类似的问题吗?
现在我别无选择,只能评论掉Powertools部分文件
Tridion_Home''web''WebUI''WebRoot''Configuration''System.Config
谢谢,François
奇怪的是,它引用了Save命令,而该命令不打算从Dashboard调用或使用。
我建议禁用JS缩小(System.config中的JScriptMinifier筛选器),因为它可能会显示更正确的详细信息。
另一个有用的东西是这个错误调用堆栈。
--
我无法从最初的问题中重现问题,但在安装PT时出现了以下错误:
PowerTools未定义
出现在*''PowerTools''Editor''PowerTools''Client''Shared''Scripts''ProgressDialog''ProgressDialog.js,它尝试在其中注册PowerToolsBase命名空间,而不是PowerTools。
如果添加,我会感到惊讶
类型.registerNamespace("PowerTools");
在文件的顶部将修复一个问题,就像在我的情况下,无论是否包含TM,它都会破坏整个GUI。
我确实检查了**PowerTools''Editor''PowerTools''Client''Shared''Scripts''ProgressDialog''ProgressDialog.js,但行
类型.registerNamespace("PowerTools");
已经在那里了,所以这里没有问题。
此外,我禁用了JS缩小。以下是UI在收到错误之前加载的主要方法:
...
PowerTools.Commands.ItemCommenting.prototype.isValidSelection = function (selection) {
//Use the existing Save command from the CME
return $cme.getCommand("Save")._isEnabled(selection);
}
...
/**
* Executes this command on the selection.
* Override this method to implement the actual functionality.
* @param {Tridion.Core.Selection} selection The current selection.
*/
Tridion.TranslationManager.Commands.SendForTranslation.prototype._execute = function SendForTranslation$_execute(selection)
{
var selectedItems = selection.getItems();
if (selectedItems.length == 1)
{
var job = $models.getItem(selectedItems[0]);
if (job)
{
if (job.isLoaded())
{
job.saveAndSend();
}
else
{
$log.warn("Unable to send an unloaded job?! {0}".format(job.getId()));
}
}
else
{
$log.warn("Unable to execute save-and-send-for-translation for this selection: {0}".format(selectedItems));
}
}
else
{
$log.warn("Unable to save-and-send-for-translation multiple items at a time.");
}
};
...
Tridion.TranslationManager.Commands.Save.prototype._isAvailable = function Save$_isAvailable(selection, pipeline)
{
var itemUri = selection.getItem(0);
var item = $models.getItem(itemUri);
var itemType = item.getItemType(); !!!!!!!!! fails on this line !!!!!! item is null or not an object
var config = $models.getItem(this.getTmUri());
if (pipeline)
{
pipeline.stop = false;
}
if (config && config.hasChanged() && (itemType == $const.ItemType.CATEGORY || itemType == $const.ItemType.FOLDER || itemType == $const.ItemType.STRUCTURE_GROUP || itemType == $const.ItemType.PUBLICATION))
{
if (pipeline)
{
pipeline.stop = true;
}
return true;
}
return this.callBase("Tridion.Cme.Command", "_isAvailable", [selection, pipeline]);
};
好的。现在很清楚了。
PowerTools.Commands.ItemCommenting用于仪表板工具栏。此命令使用Save检查其可用性。
与此同时,TM认为"保存"只会在ItemToolbar上使用。
导致问题的这些工具栏之间的区别在于,当"项目"视图总是有一个项目(当前打开)的选择时,"面板"视图可以有任何长度的选择。
ItemCommenting试图通过调用Save来检查其可用性,Save调用其所有扩展。到目前为止,选择是空的
var itemUri=选择.getItem(0);
将返回null以及
$models.getItem(null)
您可以做的是删除ItemCommenting扩展命令,就像在triion powertool trunk editor.config中所做的那样。
http://code.google.com/p/tridion-2011-power-tools/source/browse/trunk/PowerTools.Editor/Configuration/editor.config?spec=svn942&r=903[592]
- 使用Dnamics CRM 2011中的JavaScript读取子网格的所有记录,而不考虑活动页面
- 在动态crm 2011中,右键单击已完成活动的只读文本时,您是否出现错误
- CRM 2011对getAttribute的调用失败
- CRM 2011-在插入新记录或修改现有记录时捕获子网格的事件
- crm 2011使用javascript在仪表板上隐藏和显示子网格
- Mscrm 2011仪表板通过JavaScript或插件增加行数
- Javascript 选择本机 N:N 关系实体 crm 2011
- 通过 JavaScript 从主网格视图上的功能区按钮更新 CRM 2011 中的字段
- Javascript 函数在 CRM 2011 HTML Web 资源中无法识别
- 如何比较 JavaScript 格式为 2011-jan-21 的两个日期
- 如何确定控件/插件是否从 CRM 2011 中功能区上的自定义按钮触发
- new Date('2011-12-15 00:00:00') is showing up as NaN
- crm 2011 javascript将日期字段设置为null
- OnChange方法没有't触发点击-CRM 2011
- 将回复电子邮件地址更改为队列's在动态crm 2011中的电子邮件地址
- 谷歌地图Api在CRM Dynamics 2011 iframe"不可能使用显示属性“;消息
- 在CRM 2011中从JavaScript执行工作流
- 正在Microsoft Dynamics CRM 2011中加载描述内容
- 更改webresource Javascript CRM 2011中的字符串字体大小
- Tridion 2011 SP1:安装了Translation Manager和Powertools 2011的Trid