PHP warnings

Home Forums AdRotate for WordPress Bug Reports PHP warnings

  • #172425

    RunMummyRun
    Badges:

    WordPress version: 6.2
    AdRotate Pro version: 5.12.3

    There are 3 recurring lines appearing in my site’s debug log:

    
    [17-Apr-2023 17:44:04 UTC] PHP Warning:  Undefined array key "expiresweek" in /sites/staging.redacted.co.uk/files/public/app/plugins/adrotate-pro/adrotate-output.php on line 1060
    [17-Apr-2023 17:44:04 UTC] PHP Warning:  Undefined property: stdClass::$spread_all in /sites/staging.redacted.co.uk/files/public/app/plugins/adrotate-pro/adrotate-output.php on line 1078
    [17-Apr-2023 17:44:04 UTC] PHP Warning:  Undefined property: stdClass::$spread_all in /sites/staging.redacted.co.uk/files/public/app/plugins/adrotate-pro/adrotate-output.php on line 1079

    These happen on any WP admin dashboard load.

    Thanks!

    #172427

    Arnan de Gans
    Badges:

    Hello, and hmm… are those the only warnings? Nothing about missing columns in the database or something like that?

    #172430

    RunMummyRun
    Badges:

    Thanks for the quick reply!

    I am seeing periodic missing table warnings, but they don’t coincidence with the other warnings:

    
    [17-Apr-2023 21:27:03 UTC] WordPress database error Unknown column 'woo_cat' in 'field list' for query SELECT <code>id</code>, <code>woo_cat</code>, <code>woo_loc</code> FROM <code>wp_adrotate_groups</code> WHERE <code>woo_loc</code> > 0 AND <code>woo_loc</code> < 4; made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/woocommerce/templates/single-product.php'), wc_get_template_part, load_template, require('/plugins/woocommerce/templates/content-single-product.php'), do_action('woocommerce_after_single_product'), WP_Hook->do_action, WP_Hook->apply_filters, adrotate_inject_products
    #172438

    Arnan de Gans
    Badges:

    But if you’re missing those that needs to be fixed as well.
    Commonly a issue like that is because of a unfinished update.

    You can see the database version in Settings > Maintenance, near the bottom.
    If something is amiss that AdRotate can fix you’ll see red version numbers and a update button below it.

    The woo_cat stuff got added a few versions ago.

    As for the missing variables – Not sure why that would be, but presumably because the variable can’t be populated from the database.

    #172445

    RunMummyRun
    Badges:

    OK thanks, I went into Maintenance and completed the upgrade.

    But of course, I’m getting other warnings now, sorry!

    [18-Apr-2023 08:51:08 UTC] PHP Warning:  Undefined array key "expiresweek" in /sites/www.removed.co.uk/files/public/app/plugins/adrotate-pro/adrotate-output.php on line 1060
    [18-Apr-2023 08:51:08 UTC] PHP Warning:  Undefined array key "notification_schedules" in /sites/www.removed.co.uk/files/public/app/plugins/adrotate-pro/adrotate-output.php on line 1070
    [18-Apr-2023 08:51:08 UTC] PHP Warning:  Undefined array key "adstxt_file" in /sites/www.removed.co.uk/files/public/app/plugins/adrotate-pro/dashboard/settings/general.php on line 72
    [18-Apr-2023 08:51:08 UTC] PHP Warning:  Undefined array key "duplicate_adverts_filter" in /sites/www.removed.co.uk/files/public/app/plugins/adrotate-pro/adrotate-functions.php on line 396
    #172480

    Arnan de Gans
    Badges:

    Try re-activating the plugin from your Plugins dashboard page.
    I’ve checked the code to see if anything is amiss and it should all be generated as needed. SO perhaps ‘restarting’ the plugin will fix things.

    #172565

    RunMummyRun
    Badges:

    OK thanks Arnan, I’ve disable and re-activated the plugin, and I’ll keep an eye on the logs.

    #172566

    Arnan de Gans
    Badges:

    Looking forward to hear your findings. 😉

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

The topic ‘PHP warnings’ is closed to new replies.

You may be interested in