• Resolved thenbrent

    (@thenbrent)


    Because of a change to the ID for the post editor in WordPress 3.3, adding a Grunion contact form to a post/page is broken.

    To reproduce the problem, create a new post, click form button and then click “Add this form to my post” button. Bam! Nothing. ??

    JS Console shows the error:

    Uncaught TypeError: Cannot call method 'match' of undefined in grunion.js line 351

    Changing line 340 onwards of grunion.js from:

    if (isVisual) {
    	var currentCode = win.tinyMCE.activeEditor.getContent();
    } else {
    	var currentCode = jQuery('#editorcontainer textarea', window.parent.document).val();
    }

    to

    if (isVisual) {
    	var currentCode = win.tinyMCE.activeEditor.getContent();
    } else if (jQuery('#editorcontainer textarea', window.parent.document).val() === undefined) {
    	var currentCode = jQuery('#wp-content-editor-container textarea', window.parent.document).val();
    } else {
    	var currentCode = jQuery('#editorcontainer textarea', window.parent.document).val();
    }

    Fixes the problem, but only for the HTML editor.

    https://www.ads-software.com/extend/plugins/grunion-contact-form/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Grunion Contact Form] Grunion Broken in WP 3.3-aortic-dissection’ is closed to new replies.