Back to GD bbPress Attachments Forum

JS load error

Published on: May 23, 2017 at 2:23 pm · By: brivals

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_register_script(‘d4p-bbattachments-js’, GDBBPRESSATTACHMENTS_URL.’js/gd-bbpress-attachments.js’, array(‘jquery’), GDBBPRESSATTACHMENTS_VERSION);

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”); ?>

Topic Information
Bug Report
Viewing 1 replies (of 1 total)
  • #55964

    This is wrong solution. You have the problem because of the way you integrate bbPress on your website, and my plugin can’t correctly detect the page as a bbPress page. For that case, there is an option in the plugin settings to force loading of JS and CSS always, and no need to hack the plugin. Enable that option and it will work OK.

    Dev4Press - Premium plugins for WordPress.

Viewing 1 replies (of 1 total)
  • The topic ‘JS load error’ is closed to new replies.