WordPress database error Unknown column 'http_code_noticed' in 'field list'

Hello.

Having an issue in my apache logs and I wasn’t sure if it was something known, or should just be ignored, or fixed so I thought i’d post here.

OS: Ubuntu 22.04
Web: Apache 2
PHP: 8.1

I was analyzing my logs today and noticed this. I’ve tried disabling, then re-enabling all plugins in hopes the column would be created but the warning/error did not go away.




Sat Sep 17 05:38:39.827513 2022] [php:warn] [pid 129162] [client 129.222.203.220:57880] PHP Warning:  Undefined property: stdClass::$status_check_interval in /my/site/path/mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 176, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:39.827608 2022] [php:warn] [pid 129162] [client 129.222.203.220:57880] PHP Warning:  Undefined property: stdClass::$http_code_noticed in /my/site/path/mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 125, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:39.828077 2022] [php:notice] [pid 129162] [client 129.222.203.220:57880] WordPress database error Unknown column 'http_code_noticed' in 'field list' for query UPDATE `wp_mainwp_wp` SET `offline_check_result` = '1', `offline_checks_last` = '1663407519', `http_response_code` = '200', `http_code_noticed` = NULL WHERE `id` = '32' made by do_action('wp_ajax_mainwp_upgradeplugintheme'), WP_Hook->do_action, WP_Hook->apply_filters, MainWP\\Dashboard\\MainW
P_Post_Plugin_Theme_Handler->mainwp_upgrade_plugintheme, MainWP\\Dashboard\\MainWP_Updates_Handler::upgrade_plugin_theme_translation, MainWP\\Dashboard\\MainWP_Updates_Handler::update_plugin_theme_translation, MainWP\\Dashboard\\MainWP_Connect::fetch_url_authed, MainWP\\Dashboard\\MainWP_Monitoring_Handler::handle_check_website, MainWP\\Dashboard\\MainWP_DB->update_website_values, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:40.821931 2022] [php:warn] [pid 129306] [client 129.222.203.220:59695] PHP Warning:  Undefined property: stdClass::$status_check_interval in /my/site/path/mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 176, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:40.822045 2022] [php:warn] [pid 129306] [client 129.222.203.220:59695] PHP Warning:  Undefined property: stdClass::$http_code_noticed in /my/site/path/mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 125, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:40.822586 2022] [php:notice] [pid 129306] [client 129.222.203.220:59695] WordPress database error Unknown column 'http_code_noticed' in 'field list' for query UPDATE `wp_mainwp_wp` SET `offline_check_result` = '1', `offline_checks_last` = '1663407520', `http_response_code` = '200', `http_code_noticed` = NULL WHERE `id` = '40' made by do_action('wp_ajax_mainwp_upgradeplugintheme'), WP_Hook->do_action, WP_Hook->apply_filters, MainWP\\Dashboard\\MainW
P_Post_Plugin_Theme_Handler->mainwp_upgrade_plugintheme, MainWP\\Dashboard\\MainWP_Updates_Handler::upgrade_plugin_theme_translation, MainWP\\Dashboard\\MainWP_Updates_Handler::update_plugin_theme_translation, MainWP\\Dashboard\\MainWP_Connect::fetch_url_authed, MainWP\\Dashboard\\MainWP_Monitoring_Handler::handle_check_website, MainWP\\Dashboard\\MainWP_DB->update_website_values, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:41.718932 2022] [php:warn] [pid 129305] [client 129.222.203.220:65176] PHP Warning:  Undefined property: stdClass::$status_check_interval in /my/site/path/mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 176, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:41.719082 2022] [php:warn] [pid 129305] [client 129.222.203.220:65176] PHP Warning:  Undefined property: stdClass::$http_code_noticed in /my/site/path/mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 125, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab
[Sat Sep 17 05:38:41.719613 2022] [php:notice] [pid 129305] [client 129.222.203.220:65176] WordPress database error Unknown column 'http_code_noticed' in 'field list' for query UPDATE `wp_mainwp_wp` SET `offline_check_result` = '1', `offline_checks_last` = '1663407521', `http_response_code` = '200', `http_code_noticed` = '1' WHERE `id` = '54' made by do_action('wp_ajax_mainwp_upgradeplugintheme'), WP_Hook->do_action, WP_Hook->apply_filters, MainWP\\Dashboard\\MainWP
_Post_Plugin_Theme_Handler->mainwp_upgrade_plugintheme, MainWP\\Dashboard\\MainWP_Updates_Handler::upgrade_plugin_theme_translation, MainWP\\Dashboard\\MainWP_Updates_Handler::update_plugin_theme_translation, MainWP\\Dashboard\\MainWP_Connect::fetch_url_authed, MainWP\\Dashboard\\MainWP_Monitoring_Handler::handle_check_website, MainWP\\Dashboard\\MainWP_DB->update_website_values, referer: https://my.mainwp.site/wp-admin/admin.php?page=mainwp_tab






Hey @flewid

MainWP does not yet officially fully support PHP 8.1.
Can you try changing the version to 8.0 and see if that helps with the errors in the log?

Oh I see.

I’m fine with the errors, everything seems to work fine - just was concerned cause it looks like ‘http_code_noticed’ is a missing column in the database. Could I just add that column perhaps?

1 Like

Sure, you can add the column by yourself. Either through phpMyAdmin or an equivalent tool.

Let us know if that resolves the issue.

Cool yeah I can do that. What ‘type’ would it be? INT or TEXT? and does order matter as to where it’s placed column wise?

The type would be INT (length 1), and the order of the column does not matter.

Let us know how it goes.

Cool that seems to have fixed that error! I am now getting a new warning but i 'm not sure it’s anything to worry about?

PHP Warning:  Undefined property: stdClass::$status_check_interval in /mainwp/wp-content/plugins/mainwp/class/class-mainwp-monitoring-handler.php on line 176, referer: https://site.com/wp-admin/admin.php?page=mainwp_tab

Great, I’m glad that solved the error.

That warning message can be ignored, but you can also try getting rid of it by going to MainWP > Settings > General Settings, and saving the settings.

great that looks to have solved that :slight_smile: thank you for the help!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.