• I have a subscribe form I’m using on a page outside of my WordPress blog. When I originally set it up some months ago it worked fine. I’m using the iframe implementation. Recently, when working on my site I noticed Firebug was showing an error: “wysijaAJAX undefined” on pages with this iframe form and sure enough, the subscribe button no longer worked.

    It looks like the iframe form implementation is not defining wysijaAJAX before including front-subscribers.js as it does in the html implementation.

    I’ve solved this for now by adding the variable declaration in views\front\widget_nl.php when building $html (just before $scripts_html):

    ‘<script type=”text/javascript”>
    /* <![CDATA[ */
    var wysijaAJAX = {“action”:”wysija_ajax”,”controller”:”subscribers”,”ajaxurl”:”‘.admin_url(‘admin-ajax.php’,’absolute’).'”,”loadingTrans”:”‘.__(‘Loading…’,WYSIJA).'”};
    /* ]]> */
    </script>’ .

    The iframe form works now, but admittedly, I don’t know if this is the correct solution.

    Posting here in the hopes of getting a permanent fix in an upcoming release!

    https://wordpress.org/plugins/wysija-newsletters/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wysijaAJAX undefined on iframe form’ is closed to new replies.