• Resolved Uwe Jacobs

    (@uwejacobs)


    Starting with version 1.2.13, All Bootstrap Blocks generates warnings in class.areoi.styles.php on line 212 for all unused widgets.

    PHP Notice: Undefined index: owm_weather_shortcode_widget-6 in /var/www/html/wordpress/wp-content/plugins/all-bootstrap-blocks/class.areoi.styles.php on line 212

    I fixed this by an additional check inside the loop:

    $widget_blocks = array();
    if ( !empty( $widget_block ) && !empty( $sidebars_widgets ) && is_array( $sidebars_widgets ) ) {
        foreach ( $sidebars_widgets as $sidebar_widget_key => $sidebar_widget ) {
            foreach ( $sidebar_widget as $block_key => $block ) {
                $block_key = str_replace( 'block-', '', $block );
                if (!empty($widget_block[$block_key])) {
                    $block = $widget_block[$block_key];
    
                    $widget_blocks = array_merge( parse_blocks( $block['content'] ), $widget_blocks );
                }
            }
        }
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Miles

    (@areoimiles)

    Hi @uwejacobs

    Thank you for flagging this issue. I have released an update with your fix included so it should be ok going forward. I wasn’t able to recreate the issue (we must have different setups for our widgets) so please let me know if you have anymore problems and I will get fixes put in place as soon as possible.

    Thanks again

    Miles

    Thread Starter Uwe Jacobs

    (@uwejacobs)

    Hi Miles,

    This update fixes the warnings.

    I use a child template with multiple footer widgets that cover layouts for 100%, 33/33/33%, and 50/50%. Then I use the most appropriate layout option, i.e. 50/50%, and leave the others empty. These empty widgets caused the above warning.

    Regards,
    Uwe

    Plugin Author Miles

    (@areoimiles)

    Hi @uwejacobs

    A while back you asked if I could allow the latest version of Bootstrap to be used. The post where you asked is now closed for replies so I thought I would add one in here.

    I have just released a new version of the plugin and in that release you can now select between version 5.0.2 and 5.3.1. You can find this setting by clicking Bootstrap in the left hand menu then changing the Bootstrap Version option. There’s a short video that shows it here: https://areoi.io/wp-content/uploads/2023/01/Dashboard-?-Staging-—-WordPress.webm

    It’s taken me ages to get around to adding this so apologies but I just wanted to let you know it is now available.

    Miles

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Version 1.2.13 produces warnings for unused widgets’ is closed to new replies.