Support » Plugin: Alert Notice Boxes » PHP notices

  • Resolved Rudloff

    (@rudloff)


    Hello,

    I’m getting several PHP notices when I try to add a new notice:
    Notice: Trying to get property of non-object in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 92
    Notice: Undefined index: post in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 96
    Notice: Undefined index: page in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 96
    Notice: Undefined index: attachment in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 96
    Notice: Undefined index: forum in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 96
    Notice: Undefined index: topic in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 96
    Notice: Undefined index: reply in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 96
    Notice: Trying to get property of non-object in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 105
    Notice: Undefined variable: alert_notice_box_post_types in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 134

    We don’t display them on our production environment but they tend to be annoying during development because they prevent the redirect from working:
    Warning: Cannot modify header information - headers already sent by (output started at /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php:96) in /home/pierre/www/civicrm-animafac/web/wp/wp-admin/post.php on line 198
    Warning: Cannot modify header information - headers already sent by (output started at /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php:96) in /home/pierre/www/civicrm-animafac/web/wp/wp-includes/pluggable.php on line 1216

    • This topic was modified 1 year, 11 months ago by Rudloff.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author yehi

    (@yehi)

    Thank you @rudloff,
    Fixed PHP messages, if you receive more messages please send me them.

    Thanks! I updated to 2.0.4 and I don’t have these notices anymore when I add a new alert.

    However, I’m now getting some notices on our homepage:
    Notice: Trying to get property of non-object in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 347
    Notice: Trying to get property of non-object in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/includes/anb_functions.php on line 72

    Plugin Author yehi

    (@yehi)

    Hi @rudloff
    The problem is that starting with version 2 and above, the engine of the alerts changed much better.
    And if you’ve had alerts from the previous version, they should be re-saved and even recommended to make new alerts and delete the old alerts.

    Your errors have been fixed anyway.

    Please try creating a new alert and see if it works for you
    Thanks

    Hello,

    The alerts have been created with 2.0.2. I tried recreating them with 2.0.4 but I still get the same notices on the page where they are displayed.

    Plugin Author yehi

    (@yehi)

    Please update to the new version

    Sorry, 2.0.5 was not available yet when I checked.

    I now get some new notice (even when I don’t have any alert):
    Notice: Trying to get property of non-object in /home/pierre/www/civicrm-animafac/web/app/plugins/alert-notice-boxes/alert-notice-boxes.php on line 347

    After updating to Alert Notice Boxes 2.05 and removing the old alerts and creating new ones, I still see the notice on my home page: Notice: Trying to get property of non-object in /nas/content/live/palominohba/wp-content/plugins/alert-notice-boxes/alert-notice-boxes.php on line 347

    To get around Notice: Trying to get property of non-object in /nas/content/live/palominohba/wp-content/plugins/alert-notice-boxes/alert-notice-boxes.php on line 347 showing on the bottom of my pages I commented out the line:
    /* $anb_content = do_shortcode($anb_post->post_content); */
    in /wp-content/plugins/alert-notice-boxes/alert-notice-boxes.php on line 347
    It seems to work without causing any other issues.

    Plugin Author yehi

    (@yehi)

    An update has been released.
    problem solved

    I confirm I don’t get PHP notices anymore. Thanks!

    Plugin Author yehi

    (@yehi)

    Glad to hear,
    If you want to support my work, you can rank the plugin 5 stars.
    Thanks

    After upgrading to Alert Boxes Version 2.0.6 and creating new alert it works with WP version 4.9.6 as expected. Thank you for the quick response.

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