Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply threading not working in Internet Explorer


  • marcuszimbo
    Participant

    @mark-bigrock

    Hi

    I have an issue whereby reply threading is not working only in Internet Explorer.

    Does anyone have a similar issue and therefore a fix for this?

    Thanks

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)

  • Kineta
    Participant

    @kineta

    You can try putting this inside a .js file in your theme. You’ll have to adjust the tinymce editor settings in this code to your liking.

    addReply = {
    		moveForm : function(replyId, parentId, respondId, postId) {
    			
    			// remove the instance of tinymce before moving it's container
    			tinymce.remove('#bbp_reply_content');
    			// it can't possibly be this easy:
    			$('#post-container-'+parentId).after($('#'+respondId)); 
    			
    			tinyMCE.init({   
    				selector: 'textarea', 
    				plugins: 'hr, wplink, textcolor, paste, image, media, wpemoji, emoticons, charmap, fullscreen',
    				forced_root_block : "",
    				menubar: false,
    				toolbar1: 'styleselect,bold,italic,underline,strikethrough,blockquote,bullist,numlist,alignleft,aligncenter,alignright,fullscreen',
    				toolbar2: 'fontsizeselect,forecolor,outdent,indent,hr,charmap,emoticons,image,media,link,unlink,wp_help'
    			  });
    			
    			// write the correct reply-to id to the hidden field that stores it
    			// this prevents the wrong id inserted because we're returing false at the end of the function.
    			$('input#bbp_reply_to').val(parentId)
    			
    			// return false to prevent page reload, losing all the work.
    			return false; 
    		}
    	}

    marcuszimbo
    Participant

    @mark-bigrock

    Hi Kineta

    Thank you very much for your reply.

    I have tried adding the script to the custom area (head section) within my theme. It doesnt seem to change anything within IE.

    Is there anything else you could suggest?

    Thanks Mark


    Kineta
    Participant

    @kineta

    If you look at a javascript debugger are you getting a console error that reads something like “Failed to execute ‘insertBefore’ on ‘Node’” (I can’t remember the exact text)?

    If not then it’s probably a different issue than what I was dealing with.

    If you’re getting that error, it’s because a function in bbPress is trying to move the TinyMCE editor. Since the above code is an overwrite of the addReply.moveForm function, it needs to be loaded after the bbPress script. Because my example is using jquery you might need to make sure it’s in the right place for that. I’m not sure, you might need to change the $ to ‘jQuery’. Or write the code to use vanilla javascript. I have my .js file set up for jquery, following the Twentysixteen theme: everything is between:

    ( function($) {	
    $(document).ready(function() {	
    
       // all the javascript goes here...
    
    })
    })

    Kineta
    Participant

    @kineta

    sorry, that should be:

    
    ( function($) {	
    $(document).ready(function() {	
    
       // all the javascript goes here...
    
    });
    } )( jQuery );

    Robkk
    Moderator

    @robkk

    @mark-bigrock

    Do threaded replies just not work at all in Internet explorer?? Have you tried other browsers as well?
    While testing IE 11 on my windows 7 cpu, threaded replies seems to work exactly like it should, it even brings up the reply form like @kineta noted.

    For some reason the form does not pop up to the reply you are trying to thread if you use firefox or chrome for some reason. But this is a seperate issue, does not break the whole functionality of threaded replies, it just doesn’t move the form.

    This could also be a theme issue, Ive seen themes like Divi have issues with threaded replies.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar