Home Forums WoodMart support forum Some warning and notices coming from wph-widget-class.php

Some warning and notices coming from wph-widget-class.php

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #344122

    horny_fungus
    Participant

    Hi, recently I saw following messages in my error log:

    Notice: Undefined index: fields in /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php on line 538
    
    Stack Trace
    1. {main}() /wp-admin/customize.php:0
    2. do_action() /wp-admin/customize.php:123
    3. WP_Hook->do_action() /wp-includes/plugin.php:470
    4. WP_Hook->apply_filters() /wp-includes/class-wp-hook.php:327
    5. WP_Customize_Widgets->enqueue_scripts() /wp-includes/class-wp-hook.php:303
    6. WP_Customize_Widgets->get_available_widgets() /wp-includes/class-wp-customize-widgets.php:712
    7. WP_Customize_Widgets->get_widget_control() /wp-includes/class-wp-customize-widgets.php:1070
    8. wp_widget_control() /wp-includes/class-wp-customize-widgets.php:1122
    9. WOODMART_Banner_Widget->form_callback() /wp-admin/includes/widgets.php:274
    10. WOODMART_Banner_Widget->form() /wp-includes/class-wp-widget.php:534
    11. WOODMART_Banner_Widget->create_fields() /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php:76
    12. WOODMART_Banner_Widget->create_field() /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php:327
    13. WOODMART_Banner_Widget->create_field_dropdown() /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php:433
    Warning: Invalid argument supplied for foreach() in /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php on line 538
    
    Stack Trace
    1. {main}() /wp-admin/customize.php:0
    2. do_action() /wp-admin/customize.php:123
    3. WP_Hook->do_action() /wp-includes/plugin.php:470
    4. WP_Hook->apply_filters() /wp-includes/class-wp-hook.php:327
    5. WP_Customize_Widgets->enqueue_scripts() /wp-includes/class-wp-hook.php:303
    6. WP_Customize_Widgets->get_available_widgets() /wp-includes/class-wp-customize-widgets.php:712
    7. WP_Customize_Widgets->get_widget_control() /wp-includes/class-wp-customize-widgets.php:1070
    8. wp_widget_control() /wp-includes/class-wp-customize-widgets.php:1122
    9. WOODMART_Banner_Widget->form_callback() /wp-admin/includes/widgets.php:274
    10. WOODMART_Banner_Widget->form() /wp-includes/class-wp-widget.php:534
    11. WOODMART_Banner_Widget->create_fields() /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php:76
    12. WOODMART_Banner_Widget->create_field() /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php:327
    13. WOODMART_Banner_Widget->create_field_dropdown() /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php:433

    Unfortunately I have no idea what triggered the warning, supposedly some front-end activity.
    Can you please check what could happen and also tell me to what theme element this is related? Is this about header promo banner?

    #344124

    Hello,

    It seems to be a core WordPress problem not related to our theme. Try to install Classic Widgets plugin to fix this problem for now https://wordpress.org/plugins/classic-widgets/

    Best Regards

    #344125

    horny_fungus
    Participant

    Thanks for fast reply. Can you please advice how I can trigger the issue, so I can test the solution you provided?

    #344127

    Hello,

    This issue occurs when you try to modify or add new widgets under Appearance >> Widgets.

    Best Regards

    #344216

    horny_fungus
    Participant

    Unfortunately the issue repeated even after I installed and activated Classic Widgets plugin.

    #344272

    Hello,

    Please deactivate all the third party plugins and provide the login details of the website.

    Best Regards

    #344304

    horny_fungus
    Participant

    Unfortunately this is impossible as this is live site and it won’t work as intended with plugins deactivated.
    BTW the error was already reported here – https://xtemos.com/forums/topic/need-help-to-fix-one-issue/

    #344333

    Hello,

    Sorry for the misunderstanding. Some of the Errors you mentioned were from the widget area. Which are fixed after installing the classic widgets plugin.

    Therefore the other error would be fixed in the nearest update as mentioned in the other topic you attached.

    Best Regards

    #345431

    horny_fungus
    Participant

    There are several more related warnings (I suppose all these are PHP 8 specific).

    Warning: foreach() argument must be of type array|object, null given in /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php on line 538

    Warning: Undefined array key "fields" in /wp-content/themes/woodmart/inc/widgets/wph-widget-class.php on line 538

    #345813

    Artem Temos
    Keymaster

    Hello,

    Thank you for your report. We will fix these errors in our next theme update.

    Kind Regards

Viewing 10 posts - 1 through 10 (of 10 total)