• Resolved Thomas

    (@tlartaud)


    Hi,

    It seems that the plugin is no longer working after updates.

    WP version : 4.9.8
    bbPress version : 2.5.14
    Buddy-bbPress Support Topic version : 2.1.4

    Issue : When I click on the dropdown list to mark a post as resolved, it does not work. A “loading” text appears and then nothing else.

    Console error :

    
    bpbbpst-topic.js?ver=2.1.4:18 Uncaught TypeError: Cannot read property 'speak' of undefined
        at HTMLSpanElement.<anonymous> (bpbbpst-topic.js?ver=2.1.4:18)
        at Function.each (jquery.js:383)
        at jQuery.fn.init.each (jquery.js:136)
        at HTMLSelectElement.<anonymous> (bpbbpst-topic.js?ver=2.1.4:16)
        at HTMLBodyElement.dispatch (jquery.js:4641)
        at HTMLBodyElement.elemData.handle (jquery.js:4309)
    (anonymous)	@	bpbbpst-topic.js?ver=2.1.4:18
    each	@	jquery.js:383
    each	@	jquery.js:136
    (anonymous)	@	bpbbpst-topic.js?ver=2.1.4:16
    dispatch	@	jquery.js:4641
    elemData.handle	@	jquery.js:4309
    

    The line that report this error is this one : wp.a11y.speak( bpbbpstbbp_vars.loading );

    Any idea?

    Regards.

Viewing 1 replies (of 1 total)
  • Thread Starter Thomas

    (@tlartaud)

    Okay,

    there we go for the fixes. WP.a11y need to be set as dependency in public/app/plugins/buddy-bbpress-support-topic/includes/functions.php line 459.

    
    wp_enqueue_script( 'bpbbpst-topic-js', bpbbpst_get_plugin_url( 'js' ) . 'bpbbpst-topic.js', array( 'jquery', 'wp-a11y'
                ), bpbbpst_get_plugin_version(), true );
    

    ==============

    Once you fixed that, this will generate another error.

    
    bpbbpst-topic.js?ver=2.1.4:25 Uncaught ReferenceError: ajaxurl is not defined
        at HTMLSelectElement.<anonymous> (bpbbpst-topic.js?ver=2.1.4:25)
        at HTMLBodyElement.dispatch (jquery.js:4641)
        at HTMLBodyElement.elemData.handle (jquery.js:4309)
    (anonymous)	@	bpbbpst-topic.js?ver=2.1.4:25
    dispatch	@	jquery.js:4641
    elemData.handle	@	jquery.js:4309
    

    You used ajaxurl instead of bpbbpstbbp_vars.ajaxurl in public/app/plugins/buddy-bbpress-support-topic/js/bpbbpst-topic.js line 25.

    You should have this instead :

    
    $.post( bpbbpstbbp_vars.ajaxurl, $.extend( data, { 'action': 'bbp_change_support_status' } ), function( response ) {
    

    Then the plugin should work back to normal behaviour.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Uncaught TypeError: Cannot read property ‘speak’ of undefined’ is closed to new replies.