Support » Plugin: ContestHopper for WordPress » Not submintting form

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello, error found in firebug console:

    ReferenceError: ch_ctdn is not defined
    ch_ctdn(‘2591234’, ‘ch_widget-2042_1’);

    in this lines

    jQuery(document).ready(function() {
    ch_ctdn(‘2591234’, ‘ch_widget-2042_1’);
    });

    My shortcode is [contesthopper contest=”2042″]

    My theme is City Desk by Gabfire themes

    Installed plugins:

    Akismet

    Contact form 7

    Contact Form DB

    ContestHopper for WordPress

    Ninja Pages, Categories, and Tags

    PHP Text Widget

    Really Simple CAPTCHA

    Widget Logic

    WP Bannerize

    WP e-Commerce

    I tried the plugin in a fresh WP 3.8.1 installation and it works like a charm!!!

    http://www.gfserver.com.ve/demowp/concurso/

    Thanks to Carlos-Vazquez for the spanish translation and Webikon for creating this awesome plugin, but I´m stucked in my client’s page, help needed!

    Plugin Author Webikon

    (@webikon)

    Hello,
    thank you for the feedback.

    It seems that contesthopper front-end javascript and CSS is not loading on your page. From the plugin list I don’t see anything suspicious. Maybe the theme is causing that, but this is not straightforward to debug.

    You can try to work around this by manually adding
    CSS file (wp-content/plugins/contesthopper/templates/default/widget.css)
    and enqueue+localize ch_js_widget

    wp_enqueue_script('ch_js_widget');
    wp_localize_script('ch_js_widget', 'ch_ajax', array('ajaxurl' => admin_url('admin-ajax.php')));

    Hello Webikon, thanks very much for your answer.

    I added the css code into the default css theme file and now it looks OK, then I added the two lines of code you kindly indicated in the wp-includes/functions.wp-scripts.php file, but although now it shows the remaining days, it is still not working.

    function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
    global $wp_scripts;
    if ( ! is_a( $wp_scripts, ‘WP_Scripts’ ) ) {
    if ( ! did_action( ‘init’ ) )
    _doing_it_wrong( __FUNCTION__, sprintf( __( ‘Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.’ ),
    wp_enqueue_scripts‘, ‘admin_enqueue_scripts‘, ‘login_enqueue_scripts‘ ), ‘3.3’ );
    $wp_scripts = new WP_Scripts();
    }

    $wp_scripts->add( $handle, $src, $deps, $ver );
    if ( $in_footer )
    $wp_scripts->add_data( $handle, ‘group’, 1 );

    wp_enqueue_script(‘ch_js_widget’);
    }

    —————————

    function wp_localize_script( $handle, $object_name, $l10n ) {
    global $wp_scripts;
    if ( ! is_a( $wp_scripts, ‘WP_Scripts’ ) ) {
    if ( ! did_action( ‘init’ ) )
    _doing_it_wrong( __FUNCTION__, sprintf( __( ‘Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.’ ),
    wp_enqueue_scripts‘, ‘admin_enqueue_scripts‘, ‘login_enqueue_scripts‘ ), ‘3.3’ );

    return false;
    }

    return $wp_scripts->localize( $handle, $object_name, $l10n );

    wp_localize_script(‘ch_js_widget’, ‘ch_ajax’, array(‘ajaxurl’ => admin_url(‘admin-ajax.php’)));
    }

    Where should I add this code?

    Again…Thanks very very much!!

    I’m having the same issue. I have no idea how to do code.

    Is there any way you can help?

    http://steviclackphotography.com/blog/happy-birthday-to-us/

    Plugin Author Webikon

    (@webikon)

    chuo999,

    never ever edit core files. the two lines need to go to your theme functions.php, and have to be called in a hook

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script
    http://codex.wordpress.org/Function_Reference/wp_localize_script

    Plugin Author Webikon

    (@webikon)

    steviphoto,

    you have a javascript error, probably because two jquery versions are called.
    is your theme a custom one?

    juraj

    Thanks very much!

    I added this to my theme’s functions.php file

    function theme_name_scripts() {

    wp_enqueue_script(‘ch_js_widget’);
    wp_localize_script(‘ch_js_widget’, ‘ch_ajax’, array(‘ajaxurl’ => admin_url(‘admin-ajax.php’)));
    }

    add_action( ‘wp_enqueue_scripts’, ‘theme_name_scripts’ );

    Now is working.. Thanks!

    Plugin Author Webikon

    (@webikon)

    no problem,
    now enjoy some contest hoppin’ 🙂

    Thanks for this great plugin and for your support!

    Yes, my theme is custom.

    Yes, my theme is custom.

    Plugin Author Webikon

    (@webikon)

    steviphoto,

    well, you need to make sure your theme uses the same jquery version that wordpress does. this is done easily with enqueue_script.

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    since you say, you have no idea how to code, try to contact the person who created the template for you.

    cheers,

    juraj

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Not submintting form’ is closed to new replies.