<div dir="ltr"><div>Hi all,</div><div><br></div><div>We upgraded from 7.0 to 7.1 We have also applied hotfix3. We are unable to capture comments. A javascript error is thrown<span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br></span></div><div><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br></span></div><div><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">===================<br></span></div><div style="margin-left:40px"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">Uncaught TypeError: Cannot read property 'id' of undefined</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object. (Detail.js?v=7.1.0:2817)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object. (jquery.min.js?v=7.1.0:2)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at j (jquery.min.js?v=7.1.0:2)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object.fireWith [as resolveWith] (jquery.min.js?v=7.1.0:2)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object.e.(/anonymous function) [as resolve] (<a href="https://crm.abc.com/layouts/v7/lib/jquery/jquery.min.js?v=7.1.0:2:28929">https://crm.abc.com/layouts/v7/lib/jquery/jquery.min.js?v=7.1.0:2:28929</a>)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object. (Detail.js?v=7.1.0:1997)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object. (jquery.min.js?v=7.1.0:2)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at j (jquery.min.js?v=7.1.0:2)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object.fireWith [as resolveWith] (jquery.min.js?v=7.1.0:2)</span><br style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">at Object.e.(/anonymous function) [as resolve] (<a href="https://crm.abc.com/layouts/v7/lib/jquery/jquery.min.js?v=7.1.0:2:28929">https://crm.abc.com/layouts/v7/lib/jquery/jquery.min.js?v=7.1.0:2:28929</a>)</span></div><div><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">========================</span></div><div><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br></span></div><div><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">This error is generated in the function detailed below as data is undefined when saving a new comment.<br></span></div><div><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br></span></div><div><pre style="margin:1em 0px;padding:4px 8px;border:1px solid rgb(238,238,204);outline:currentcolor none 0px;font-weight:400;font-style:normal;font-size:11.6188px;font-family:monospace;vertical-align:baseline;border-radius:2px;background:rgb(255,255,153) none repeat scroll 0% 0%;overflow:auto;display:block;white-space:pre;color:rgb(0,0,0);font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><code style="margin:0px;padding:0px;border:medium none;outline:currentcolor none 0px;font-weight:inherit;font-style:inherit;font-size:11.6187px;font-family:monospace;vertical-align:baseline;border-radius:2px;background:rgb(255,255,153) none repeat scroll 0% 0%;overflow:auto;white-space:pre"> detailContentsHolder.on('click','.saveComment', function(e){
var element = jQuery(e.currentTarget);
if(!<a href="http://element.is">element.is</a>(":disabled")) {
var currentTarget = jQuery(e.currentTarget);
var mode = currentTarget.data('mode');
var dataObj = self.saveComment(e);
dataObj.then(function(data){
var closestAddCommentBlock = currentTarget.closest('.addCommentBlock');
var commentTextAreaElement = closestAddCommentBlock.find('.commentcontent');
var commentInfoBlock = currentTarget.closest('.singleComment');
commentTextAreaElement.val('');
closestAddCommentBlock.find('#is_private').removeAttr('checked');
if(mode == "add"){
var commentId = data['id']; // <======================== data is undefined.
var commentHtml = self.getCommentUI(commentId);
commentHtml.then(function(data){
var html;
if(jQuery(data).hasClass('privateComment')) {
html = '<ul class="unstyled"><li class="commentDetails" style="background: #fff9ea;">'+data+'</li></ul>';
} else {
html = '<ul class="unstyled"><li class="commentDetails">'+data+'</li></ul>';
}
var commentBlock = closestAddCommentBlock.closest('.commentDetails');
var detailContentsHolder = self.getContentHolder();
var noCommentsMsgContainer = jQuery('.noCommentsMsgContainer',detailContentsHolder);
noCommentsMsgContainer.remove();
if(commentBlock.length > 0){
closestAddCommentBlock.remove();
var childComments = commentBlock.find('ul');
if(childComments.length <= 0){
var currentChildCommentsCount = commentInfoBlock.find('.viewThreadBlock').data('childCommentsCount');
var newChildCommentCount = currentChildCommentsCount + 1;
commentInfoBlock.find('.childCommentsCount').text(newChildCommentCount);
var parentCommentId = commentInfoBlock.find('.commentInfoHeader').data('commentid');
self.getChildComments(parentCommentId).then(function(responsedata){
jQuery(responsedata).appendTo(commentBlock);
commentInfoBlock.find('.viewThreadBlock').hide();
commentInfoBlock.find('.hideThreadBlock').show();
});
}else {
jQuery(html).appendTo(commentBlock);
}
} else {
jQuery(html).prependTo(closestAddCommentBlock.closest('.commentContainer').find('.commentsList'));
commentTextAreaElement.css({height : '71px'});
}
commentInfoBlock.find('.commentActionsContainer').show();
});
}else if(mode == "edit"){
var modifiedTime = commentInfoBlock.find('.commentModifiedTime');
var commentInfoContent = commentInfoBlock.find('.commentInfoContent');
var commentEditStatus = commentInfoBlock.find('[name="editStatus"]');
var commentReason = commentInfoBlock.find('[name="editReason"]');
commentInfoContent.html(data.commentcontent);
commentReason.html(data.reasontoedit);
modifiedTime.text(data.modifiedtime);
modifiedTime.attr('title',data.modifiedtimetitle)
if(commentEditStatus.hasClass('hide')){
commentEditStatus.removeClass('hide');
}
if(data.reasontoedit != ""){
commentInfoBlock.find('.editReason').removeClass('hide')
}
commentInfoContent.show();
commentInfoBlock.find('.commentActionsContainer').show();
closestAddCommentBlock.remove();
}
element.removeAttr('disabled');
var indexInstance = Vtiger_Index_Js.getInstance();
indexInstance.registerMultiUpload();
});
}
});<br><br></code></pre><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:14.3px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"></span></div></div>