Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author cpres

    (@cpres)

    Thanks for letting me know about this, although I’m on the latest version of WordPress and it still seems to be working OK for me…perhaps another plugin is conflicting with it.

    Do you see any javascript errors on the page from having a Console open? (Firebug, Chrome Inspector)

    Thread Starter David Klhufek

    (@brtak)

    Hi, ok, I found this error in console..

    <script>(function() {with (this[2]) {with (this[1]) {with (this[0]) {return function(event) {insertTag()
    };}}}})</script>
                                                  <script>
    var _self = tinyMCEPopup;
    function insertTag() {
        var satellite_type = jQuery('input[name="satellite_type"]:checked').val();
        var auto = jQuery('input[name="auto"]:checked').val();
        var thumbs = jQuery('input[name="thumbs"]:checked').val();
        var caption = jQuery('input[name="caption"]:checked').val();
        if (satellite_type == "post") {
            var post_id = jQuery('#post_id').val();
            var exclude = jQuery('#exclude').val();
            if (post_id == "th") {
                var tag = '[satellite';
            } else {
                var tag = '[satellite post_id=' + post_id + '';
            }
            if (exclude != "") {
                tag += ' exclude="' + exclude + ' "';
            }
            if (auto == undefined) { tag += '';} else { tag += ' auto=' + auto+'';}
            if (caption == undefined) { tag += '';} else { tag += ' caption=' + caption;}
            if (thumbs == undefined) { tag += ']';} else { tag += ' thumbs=' + thumbs + ']';}
        } else if (satellite_type == "custom") {
            var gal_id = jQuery('#gal_id').val();
    
            var tag = '[satellite gallery='+ gal_id +'';
            if (auto == undefined) { tag += '';} else { tag += ' auto=' + auto;}
            if (caption == undefined) { tag += '';} else { tag += ' caption=' + caption;}
            if (thumbs == undefined) { tag += ']';} else { tag += ' thumbs=' + thumbs + ']';}		
    
        }
        if (window.tinyMCE) {
            window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tag);
            tinyMCEPopup.editor.execCommand('mceRepaint');
            tinyMCEPopup.close();
        }
    }
    function closePopup() {
        tinyMCEPopup.close();
    }
    	</script>

    Uncaught TypeError: undefined is not a function dialog.php:40
    Any idea?

    Hi, Just found this problem myself after a bit of working out found the source of the problem in dialog.php line 56 I changed
    window.tinyMCE.execInstanceCommand(‘content’, ‘mceInsertContent’, false, tag);
    to
    window.tinyMCE.execCommand(‘mceInsertContent’, false, tag);
    And this solved the problem.

    Plugin Author cpres

    (@cpres)

    You’re a life save Scottitchy! I’ve been swamped with a new job so I haven’t been able to do some proper debugging, this will go in the upcoming edition for sure!

    Thread Starter David Klhufek

    (@brtak)

    Thank you, it’s fixed..

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Inserting shortcodes not working..’ is closed to new replies.