I encountered a situation with ” GD bbpress attachment “.
I realized that since the update of wordpress, the script gd-bbpress-attachment.js was not correctly loaded.
I share with you my solution!
In the file /wp-content/plugins/gd-bbpress-attachments/code/attachments/front.php I modified the function:
public function wp_enqueue_scripts() {
if (d4p_bba_o(‘include_always’) == 1 || d4p_is_bbpress()) {
if (d4p_bba_o(‘include_css’) == 1) {
wp_enqueue_style(‘d4p-bbattachments-css’, GDBBPRESSATTACHMENTS_URL.’css/gd-bbpress-attachments.css’, array(), GDBBPRESSATTACHMENTS_VERSION);
}
if (d4p_bba_o(‘include_js’) == 1) {
wp_enqueue_script(‘jquery’);
wp_register_script(‘d4p-bbattachments-js’, GDBBPRESSATTACHMENTS_URL.’js/gd-bbpress-attachments.js’, array(‘jquery’), GDBBPRESSATTACHMENTS_VERSION);
wp_enqueue_script(‘d4p-bbattachments-js’);
}
}
}
Furthermore, when I clicked the button “Add another file”, it created a “page jump”.
To correct, I modify the file /wp-content/plugins/gd-bbpress-attachments/forms/uploader.php :
<?php _e(“Add another file”, “gd-bbpress-attachments”); ?>
- The topic ‘JS load error’ is closed to new replies.