pods-framework / pods-beaver-builder-themer-add-on

Integration of Beaver Themer plugin for WordPress (https://pods.io/beaver-themer/)
https://wordpress.org/plugins/pods-beaver-builder-themer-add-on/
GNU General Public License v2.0
35 stars 6 forks source link

Errors upon activation with Beaver Builder 2.0 #52

Closed corypina closed 6 years ago

corypina commented 7 years ago

Preface: This is the first time I've ever activated this add-on, so it's my only experience.

Upon plugin activation, we are seeing these errors spit out at the bottom of the page, but only when the Beaver Builder Page Builder is active.

Strict Standards: Non-static method PodsBeaverPageData::recurse_pod_fields() should not be called statically in /www/wp-content/plugins/pods-beaver-builder-themer-add-on/classes/class-pods-beaver-page-data.php on line 391 

Strict Standards: Non-static method PodsBeaverPageData::recurse_pod_fields() should not be called statically in /www/wp-content/plugins/pods-beaver-builder-themer-add-on/classes/class-pods-beaver-page-data.php on line 392 

Notice: Undefined index: type in /www/wp-content/plugins/bb-plugin/classes/class-fl-builder-ui-settings-forms.php on line 153 

Notice: Undefined index: type in /www/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php on line 3401 

Notice: Undefined index: type in /www/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php on line 3414 

All plugins are up to date:

quasel commented 7 years ago

Pleas use the Version from GitHub - https://github.com/pods-framework/pods-beaver-builder-themer-add-on/archive/1.x.zip - I will plan to release it to WP Repo in the next few days just not at home until Tuesday - sorry !

corypina commented 7 years ago

Thanks, @quasel.

That took care of the "Strict Standards" errors, but I'm still getting the remaining three notices, which seem to be from within the primary BB plugin, but they only manifest when I've activated the Pods Themer Add-On:

Notice: Undefined index: type in /www/wp-content/plugins/bb-plugin/classes/class-fl-builder-ui-settings-forms.php on line 153

Notice: Undefined index: type in /www/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php on line 3401 

Notice: Undefined index: type in /www/wp-content/plugins/bb-plugin/classes/class-fl-builder-model.php on line 3414

I'll ask the BB folks about this as well.

codente commented 6 years ago

Hey guys! We've (BB Support team member here) been looking into the Notice: Undefined index: type and Justin determined that it relates to PodsBeaverPageData::pods_get_settings_fields not returning a proper BB field config array if there are no Pods fields. Here's what he said to do to fix

From

if ( empty( $fields ) ) {
    $fields['options'] = array(
        '' => __( 'No fields found', 'pods-beaver-builder-themer-add-on' ),
    );
}

to

if ( empty( $fields ) ) {
    $fields = array(
        'settings_field' => array(
            'type'    => 'select',
            'label'   => __( 'Field from Settings / Current User', 'pods-beaver-builder-themer-add-on' ),
            'options' => array(
                '' => __( 'No fields found', 'pods-beaver-builder-themer-add-on' ),
            ),
        ),
    );
}
jimtrue commented 6 years ago

@quasel I had @codente add all the notes above

quasel commented 6 years ago

Took a different route to fix it but it's in the next release - should be on GitHub 1.x today

quasel commented 6 years ago

and thanks for the code!

corypina commented 6 years ago

You're all my heroes.