“Load subject, content and attachment from this email template” JS error
-
Clicking this button throws
ncaught TypeError: Cannot read property 'setContent' of null at Object.success (email-template-attachment-admin.js?ver=d06708e94f214c25ca58e211a9134360:53) at i (load-scripts.php?c=0&load[chunk_0]=jquery-core,utils,moxiejs,plupload&ver=d06708e94f214c25ca58e211a9134360:2) at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[chunk_0]=jquery-core,utils,moxiejs,plupload&ver=d06708e94f214c25ca58e211a9134360:2) at x (load-scripts.php?c=0&load[chunk_0]=jquery-core,utils,moxiejs,plupload&ver=d06708e94f214c25ca58e211a9134360:4) at XMLHttpRequest.c (load-scripts.php?c=0&load[chunk_0]=jquery-core,utils,moxiejs,plupload&ver=d06708e94f214c25ca58e211a9134360:4)
from this block in
$( '#load_email_template' ).click( function(){ if( $( '#email_template_selected' ).val() == '' ) return; var data = { 'action': 'acui_email_template_selected', 'email_template_selected': $( '#email_template_selected' ).val(), 'security': email_template_attachment_admin.security, }; $.post( ajaxurl, data, function( response ) { var response = JSON.parse( response ); $( '#title' ).val( response.title ); tinyMCE.get( 'body_mail' ).setContent( response.content ); $( '#email_template_attachment_id' ).val( response.attachment_id ); if( response.attachment_url != '' ){ $( '#email_template_attachment_file' ).val( response.attachment_url ); } $( '#template_id' ).val( response.id ); $( '#save_mail_template_options' ).click(); }); } );
specifically:
tinyMCE.get( ‘body_mail’ ).setContent( response.content );
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘“Load subject, content and attachment from this email template” JS error’ is closed to new replies.