[Vtigercrm-developers] Cannot add comments on 7.1
Mark
mclarke4 at gmail.com
Tue Apr 9 19:06:31 GMT 2019
Hi Prasad,
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.
I will remember you tip for next time as it does look very handy!
kind regards
Mark
On Tue, 9 Apr 2019 at 17:32, Prasad <prasad at vtiger.com> wrote:
> Mark,
>
> Please turn-on dieOnError in database class to review the issue closer.
> --
> FB <http://www.facebook.com/vtiger> I Twit <http://twitter.com/vtigercrm>
> I LIn <https://www.linkedin.com/company/1270573?trk=tyah> I Blog
> <https://blogs.vtiger.com> I Website <https://www.vtiger.com/>
>
>
> On Mon, Apr 8, 2019 at 9:31 PM Mark <mclarke4 at gmail.com> wrote:
>
>> Hi all,
>>
>> We upgraded from 7.0 to 7.1 We have also applied hotfix3. We are unable
>> to capture comments. A javascript error is thrown
>>
>> ===================
>> Uncaught TypeError: Cannot read property 'id' of undefined
>> at Object. (Detail.js?v=7.1.0:2817)
>> at Object. (jquery.min.js?v=7.1.0:2)
>> at j (jquery.min.js?v=7.1.0:2)
>> at Object.fireWith [as resolveWith] (jquery.min.js?v=7.1.0:2)
>> at Object.e.(/anonymous function) [as resolve] (
>> https://crm.abc.com/layouts/v7/lib/jquery/jquery.min.js?v=7.1.0:2:28929)
>> at Object. (Detail.js?v=7.1.0:1997)
>> at Object. (jquery.min.js?v=7.1.0:2)
>> at j (jquery.min.js?v=7.1.0:2)
>> at Object.fireWith [as resolveWith] (jquery.min.js?v=7.1.0:2)
>> at Object.e.(/anonymous function) [as resolve] (
>> https://crm.abc.com/layouts/v7/lib/jquery/jquery.min.js?v=7.1.0:2:28929)
>> ========================
>>
>> This error is generated in the function detailed below as data is
>> undefined when saving a new comment.
>>
>> detailContentsHolder.on('click','.saveComment', function(e){
>> var element = jQuery(e.currentTarget);
>> if(!element.is(":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();
>> });
>> }
>> });
>>
>> _______________________________________________
>> http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20190409/92b3eba3/attachment-0001.html>
More information about the vtigercrm-developers
mailing list