Issue with Beaver Builder
Opened this issue · 2 comments
yallahweb commented
There's an issue with Beaver Builder (2.0.6.3 and the 6 latests versions) and this widget. It used to be editable in Beaver Builder but actually there is an issue with the "tax_term_postback" as seen in the Chrome console.
It gives a white screen without any options in Beaver Builder frontend editor.
robincornett commented
I've had to deal with this in a similar plugin. Modifying the enqueue scripts function to this:
/**
* Enqueues the small bit of Javascript which will handle the Ajax
* callback to correctly populate the custom term dropdown.
*/
public function enqueue_admin_scripts() {
if ( is_admin() ) {
$screen = get_current_screen();
if ( ! in_array( $screen->id, array( 'widgets', 'customize' ), true ) ) {
return;
}
}
wp_enqueue_script( 'tax-term-ajax-script', plugins_url( '/js/ajax_handler.js', __FILE__ ), array( 'jquery' ) );
wp_localize_script( 'tax-term-ajax-script', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
}
and then adding this after the line which calls the admin_enqueue_scripts
:
add_action( 'fl_builder_editing_enabled', function () {
add_action( 'wp_print_scripts', array( $this, 'enqueue_admin_scripts' ) );
} );
Seems to resolve the issue of the needed scripts not enqueuing for BB, as the builder does not exist in the WP admin.
yallahweb commented
Thanks for this hack but finally a CSS hack did the trick 👍
.fl-builder-settings-fields{visibility: initial!important;}