Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author mrwweb

    (@mrwweb)

    Thanks for the report.

    If you can, could you copy/paste the errors into this thread. It’ll help me pinpoint the issue a big faster.

    Also, are you seeing these errors in the Console or on the page? I’m trying to figure out where the AJAX is coming into this.

    Thread Starter maxwelton

    (@maxwelton)

    I’m using the plugin “query monitor” and this is its output to the JS console:

    === PHP Error in AJAX Response === query-monitor.js:198:5
    Object {
       type: "notice"
       message: "Undefined index: show_excerpt"
       file: "\wp-content\plugins\feature-a-page-widget\inc\fpw_widget_class.php"
       line: 224
       stack: Array[4]
          0: FPW_Widget->update()
          1: WP_Widget->update_callback()
          2: wp_ajax_save_widget()
          3: do_action('wp_ajax_save-widget')
    }

    Lines 222 – 224 just need some isset() checks, I think:

    $instance['show_title'] = (bool) $new_instance['show_title'];
    $instance['show_image'] = (bool) $new_instance['show_image'];
    $instance['show_excerpt'] = (bool) $new_instance['show_excerpt'];
    $instance['show_read_more'] = (bool) $new_instance['show_read_more'];

    I get a warning per unchecked option when saving the widget in admin->appearance->widgets.

    Plugin Author mrwweb

    (@mrwweb)

    Very helpful. Thanks! I’ll try to get this fixed soon.

    Plugin Author mrwweb

    (@mrwweb)

    I was able to reproduce and will have a fix ready soon. However, I’m tempted to say this isn’t worth pushing out an update for on its own. Is this causing you any noticeable functional problems? If not, I’ll fix it soon but sit on it until I can get in some meaningful other changes.

    If you want a working patch, I will post that here for the meantime.

    Plugin Author mrwweb

    (@mrwweb)

    The 2.0.6 release today should resolve this issue. Thanks again for posting, @maxwelton.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ajax PHP warning’ is closed to new replies.