<div dir="ltr"><div>Hi Prasad,</div><div><br></div><div>thanks for the reply. I overcame the problem by exporting data only from the database and then doing a fresh install and copying the data back. This fixed a number of issues. The problems seems to have been related to differing charsets and collations on tables that have accrued over time. e.g the need to create the vtgier_cvrole etc tables manually in the past. Also the fact that we upgraded from 14.05 to 16.04 which meant changes to requirements for timestamp etc. which were sorted out when  the wizard created the table structures on the upgraded database.<br><br></div><div>I will remember you tip for next time as it does look very handy!</div><div><br></div><div>kind regards</div><div><br></div><div>Mark<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 9 Apr 2019 at 17:32, Prasad <<a href="mailto:prasad@vtiger.com">prasad@vtiger.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Mark,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Please turn-on dieOnError in database class to review the issue closer.</div><div><div dir="ltr" class="gmail-m_-8879288627590373490gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">--</div><div dir="ltr"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><a href="http://www.facebook.com/vtiger" style="color:rgb(0,0,204)" target="_blank">FB</a> I </span><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twit</a> I <a href="https://www.linkedin.com/company/1270573?trk=tyah" style="color:rgb(0,0,204)" target="_blank">LIn</a> I <a href="https://blogs.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Blog</a> I <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 8, 2019 at 9:31 PM Mark <<a href="mailto:mclarke4@gmail.com" target="_blank">mclarke4@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">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" target="_blank">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-wrap;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-wrap">    detailContentsHolder.on('click','.saveComment', function(e){
        var element = jQuery(e.currentTarget);
        if(!<a href="http://element.is" target="_blank">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>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>