WordPress.org

Ready to get started?Download WordPress

Forums

Grunion Contact Form
[resolved] Grunion Broken in WP 3.3-aortic-dissection (3 posts)

  1. thenbrent
    Member
    Posted 2 years ago #

    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.

    http://wordpress.org/extend/plugins/grunion-contact-form/

  2. Joseph Scott
    Member
    Plugin Author

    Posted 2 years ago #

    This is something I noticed a few days ago and I've already committed fixes for it to Grunion -trunk : http://plugins.trac.wordpress.org/browser/grunion-contact-form/trunk

    I'm running a few more tests in different environments and then we'll be looking to push out a new version of Grunion.

  3. thenbrent
    Member
    Posted 2 years ago #

    Good to know and thanks for fixing!

    I thought I checked trunk, but must have confused myself.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic